aboutsummaryrefslogtreecommitdiff
path: root/crypto/compat/issetugid_win.c
blob: d0c598d88150d3175fa5ac6cbbd4f96b67a3cf12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * 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).
 *
 * Future versions of this function that are made more 'open' should thoroughly
 * consider the case of this code running as a privileged service with saved
 * user credentials or privilege escalations by other means (e.g. the old
 * RunAsEx utility.)
 */
int issetugid(void)
{
	return 1;
}