diff options
author | Wayne Davison <wayned@samba.org> | 2009-10-17 15:03:11 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-10-17 15:03:11 -0700 |
commit | d23cc156aa36135a2970321873798d35626d477b (patch) | |
tree | eea8697272703ea8132316de479bc5facfc40ab1 | |
parent | 6f098b0f8c1c3582013f20970bf575ab487f6bda (diff) | |
download | android_external_rsync-d23cc156aa36135a2970321873798d35626d477b.tar.gz android_external_rsync-d23cc156aa36135a2970321873798d35626d477b.tar.bz2 android_external_rsync-d23cc156aa36135a2970321873798d35626d477b.zip |
Call seteuid() when calling setuid().
-rw-r--r-- | clientserver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clientserver.c b/clientserver.c index f2751a4f..eeaf8e15 100644 --- a/clientserver.c +++ b/clientserver.c @@ -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; |