Call seteuid() when calling setuid().
authorWayne Davison <wayned@samba.org>
Sat, 17 Oct 2009 22:03:11 +0000 (15:03 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 17 Oct 2009 22:03:11 +0000 (15:03 -0700)
clientserver.c

index f2751a4..eeaf8e1 100644 (file)
@@ -801,7 +801,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        }
 
        if (set_uid) {
-               if (setuid(uid)) {
+               if (setuid(uid) || seteuid(uid)) {
                        rsyserr(FLOG, errno, "setuid %ld failed", (long)uid);
                        io_printf(f_out, "@ERROR: setuid failed\n");
                        return -1;