from vinschen at redhat.com
+20140118
+ - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch
+ from vinschen at redhat.com
+
20140117
- (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain
hardening flags including -fstack-protector-strong. These default to on
void
permanently_drop_suid(uid_t uid)
{
+#ifndef HAVE_CYGWIN
uid_t old_uid = getuid();
+#endif
debug("permanently_drop_suid: %u", (u_int)uid);
if (setresuid(uid, uid, uid) < 0)
void
permanently_set_uid(struct passwd *pw)
{
+#ifndef HAVE_CYGWIN
uid_t old_uid = getuid();
gid_t old_gid = getgid();
+#endif
if (pw == NULL)
fatal("permanently_set_uid: no user given");