]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch
authorDarren Tucker <dtucker@zip.com.au>
Sat, 18 Jan 2014 09:43:49 +0000 (20:43 +1100)
committerDarren Tucker <dtucker@zip.com.au>
Sat, 18 Jan 2014 09:43:49 +0000 (20:43 +1100)
   from vinschen at redhat.com

ChangeLog
uidswap.c

index 4eb8590400b0e6eea93e2d43fe89c00c9f94e3bc..ad20184b4052bb27ed89122c428b5462614eae2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index 23217ba5c3d6e14f277662561b9b935fd4f323ca..1f09d58876dbf918d699d80da32fd5fae29d6f52 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -134,7 +134,9 @@ temporarily_use_uid(struct passwd *pw)
 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)
@@ -197,8 +199,10 @@ restore_uid(void)
 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");