diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | uidswap.c | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20140118 | ||
2 | - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch | ||
3 | from vinschen at redhat.com | ||
4 | |||
1 | 20140117 | 5 | 20140117 |
2 | - (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain | 6 | - (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain |
3 | hardening flags including -fstack-protector-strong. These default to on | 7 | hardening flags including -fstack-protector-strong. These default to on |
@@ -134,7 +134,9 @@ temporarily_use_uid(struct passwd *pw) | |||
134 | void | 134 | void |
135 | permanently_drop_suid(uid_t uid) | 135 | permanently_drop_suid(uid_t uid) |
136 | { | 136 | { |
137 | #ifndef HAVE_CYGWIN | ||
137 | uid_t old_uid = getuid(); | 138 | uid_t old_uid = getuid(); |
139 | #endif | ||
138 | 140 | ||
139 | debug("permanently_drop_suid: %u", (u_int)uid); | 141 | debug("permanently_drop_suid: %u", (u_int)uid); |
140 | if (setresuid(uid, uid, uid) < 0) | 142 | if (setresuid(uid, uid, uid) < 0) |
@@ -197,8 +199,10 @@ restore_uid(void) | |||
197 | void | 199 | void |
198 | permanently_set_uid(struct passwd *pw) | 200 | permanently_set_uid(struct passwd *pw) |
199 | { | 201 | { |
202 | #ifndef HAVE_CYGWIN | ||
200 | uid_t old_uid = getuid(); | 203 | uid_t old_uid = getuid(); |
201 | gid_t old_gid = getgid(); | 204 | gid_t old_gid = getgid(); |
205 | #endif | ||
202 | 206 | ||
203 | if (pw == NULL) | 207 | if (pw == NULL) |
204 | fatal("permanently_set_uid: no user given"); | 208 | fatal("permanently_set_uid: no user given"); |