From 983103b0db51c6be77a93c3d2b4e7decfdc89499 Mon Sep 17 00:00:00 2001 From: Brent Cook <bcook@openbsd.org> Date: Mon, 28 Jul 2014 21:06:37 -0500 Subject: stub win32 issetugid implementation ok deraadt@ beck@ --- crypto/Makefile.am.tpl | 3 +++ crypto/compat/issetugid_win.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 crypto/compat/issetugid_win.c (limited to 'crypto') 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 if HOST_LINUX libcompat_la_SOURCES += compat/issetugid_linux.c endif +if HOST_WIN +libcompat_la_SOURCES += compat/issetugid_win.c +endif endif 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 @@ +/* + * issetugid implementation for Windows + * Public domain + */ + +#include <unistd.h> + +/* + * Windows does not have a native setuid/setgid functionality. + * A user must enter credentials each time a process elevates its + * privileges. + * + * So, in theory, this could always return 0, given what I know currently. + * However, it makes sense to stub out initially in 'safe' mode until we + * understand more (and determine if any disabled functionality is actually + * useful on Windows anyway). + */ +int issetugid(void) +{ + return 1; +} -- cgit v1.2.3-55-g6feb