search for: drop_suid

Displaying 1 result from an estimated 1 matches for "drop_suid".

2002 Mar 12
2
Patch: --drop-suid Remove suid/sgid from target files
...-orig/flist.c rsync-2.5.4pre1/flist.c --- rsync-2.5.4pre1-orig/flist.c Thu Feb 14 05:30:27 2002 +++ rsync-2.5.4pre1/flist.c Tue Mar 12 21:57:27 2002 @@ -36,7 +36,9 @@ extern int verbose; extern int do_progress; extern int am_server; +extern int am_sender; extern int always_checksum; +extern int drop_suid; extern int cvs_exclude; @@ -714,6 +716,10 @@ #ifdef HAVE_STRUCT_STAT_ST_RDEV file->rdev = st.st_rdev; #endif + + if (am_sender && drop_suid && S_ISREG(st.st_mode)) { + file->mode &= ~(S_ISUID | S_ISGID); + } #if SUPPORT_LINKS if (S_ISLNK(st.st_mode)) { diff...