Displaying 1 result from an estimated 1 matches for "strip_perm".
2002 Jun 21
1
small security-related rsync extension
...;&
X*** backup.c.t Sun May 6 23:59:37 2001
X--- backup.c Fri Jun 21 13:15:51 2002
X***************
X*** 29,34 ****
X--- 29,56 ----
X extern int preserve_devices;
X extern int preserve_links;
X extern int preserve_hard_links;
X+ extern int priv_backups;
X+
X+ #ifdef HAVE_CHMOD
X+ static int strip_perm(char *fname)
X+ {
X+ struct stat buf;
X+ if (link_stat(fname,&buf) != 0) {
X+ rprintf(FERROR,"stat failed\n");
X+ return 0;
X+ }
X+
X+ if (S_ISREG(buf.st_mode) && (buf.st_mode & (S_ISUID | S_ISGID))) {
X+ mode_t new_mode;
X+ new_mode = buf.st_mode & 01777;...