aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2014-07-28 21:06:37 -0500
committerBrent Cook <bcook@openbsd.org>2014-07-29 11:17:44 -0500
commit983103b0db51c6be77a93c3d2b4e7decfdc89499 (patch)
treeaacf609b611d52ea486e96e971de3e9e648c6986 /crypto
parent46dd7aac408bc5ed4387b01a24f83f96b5b87cd3 (diff)
downloadportable-983103b0db51c6be77a93c3d2b4e7decfdc89499.tar.gz
portable-983103b0db51c6be77a93c3d2b4e7decfdc89499.tar.bz2
portable-983103b0db51c6be77a93c3d2b4e7decfdc89499.zip
stub win32 issetugid implementation
ok deraadt@ beck@
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Makefile.am.tpl3
-rw-r--r--crypto/compat/issetugid_win.c21
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
78if HOST_LINUX 78if HOST_LINUX
79libcompat_la_SOURCES += compat/issetugid_linux.c 79libcompat_la_SOURCES += compat/issetugid_linux.c
80endif 80endif
81if HOST_WIN
82libcompat_la_SOURCES += compat/issetugid_win.c
83endif
81endif 84endif
82 85
83noinst_HEADERS = des/ncbc_enc.c 86noinst_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 */
18int issetugid(void)
19{
20 return 1;
21}