diff options
| author | Brent Cook <bcook@openbsd.org> | 2014-07-28 21:06:37 -0500 |
|---|---|---|
| committer | Brent Cook <bcook@openbsd.org> | 2014-07-29 11:17:44 -0500 |
| commit | 983103b0db51c6be77a93c3d2b4e7decfdc89499 (patch) | |
| tree | aacf609b611d52ea486e96e971de3e9e648c6986 | |
| parent | 46dd7aac408bc5ed4387b01a24f83f96b5b87cd3 (diff) | |
| download | portable-983103b0db51c6be77a93c3d2b4e7decfdc89499.tar.gz portable-983103b0db51c6be77a93c3d2b4e7decfdc89499.tar.bz2 portable-983103b0db51c6be77a93c3d2b4e7decfdc89499.zip | |
stub win32 issetugid implementation
ok deraadt@ beck@
| -rw-r--r-- | crypto/Makefile.am.tpl | 3 | ||||
| -rw-r--r-- | crypto/compat/issetugid_win.c | 21 |
2 files changed, 24 insertions, 0 deletions
diff --git a/crypto/Makefile.am.tpl b/crypto/Makefile.am.tpl index 7688fb9..bb30aa2 100644 --- a/crypto/Makefile.am.tpl +++ b/crypto/Makefile.am.tpl | |||
| @@ -78,6 +78,9 @@ if NO_ISSETUGID | |||
| 78 | if HOST_LINUX | 78 | if HOST_LINUX |
| 79 | libcompat_la_SOURCES += compat/issetugid_linux.c | 79 | libcompat_la_SOURCES += compat/issetugid_linux.c |
| 80 | endif | 80 | endif |
| 81 | if HOST_WIN | ||
| 82 | libcompat_la_SOURCES += compat/issetugid_win.c | ||
| 83 | endif | ||
| 81 | endif | 84 | endif |
| 82 | 85 | ||
| 83 | noinst_HEADERS = des/ncbc_enc.c | 86 | noinst_HEADERS = des/ncbc_enc.c |
diff --git a/crypto/compat/issetugid_win.c b/crypto/compat/issetugid_win.c new file mode 100644 index 0000000..7602a9b --- /dev/null +++ b/crypto/compat/issetugid_win.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * issetugid implementation for Windows | ||
| 3 | * Public domain | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include <unistd.h> | ||
| 7 | |||
| 8 | /* | ||
| 9 | * Windows does not have a native setuid/setgid functionality. | ||
| 10 | * A user must enter credentials each time a process elevates its | ||
| 11 | * privileges. | ||
| 12 | * | ||
| 13 | * So, in theory, this could always return 0, given what I know currently. | ||
| 14 | * However, it makes sense to stub out initially in 'safe' mode until we | ||
| 15 | * understand more (and determine if any disabled functionality is actually | ||
| 16 | * useful on Windows anyway). | ||
| 17 | */ | ||
| 18 | int issetugid(void) | ||
| 19 | { | ||
| 20 | return 1; | ||
| 21 | } | ||
