search for: _s_ifmt

Displaying 12 results from an estimated 12 matches for "_s_ifmt".

Did you mean: s_ifmt
2004 Mar 05
2
Problem with --link-dest when syncing AIX to Linux
...transferred? I did some debugging and found out that the problem seems to be in the function skip_file() in generator.c: if (link_dest) { extern int preserve_perms; extern int preserve_uid; extern int preserve_gid; if(preserve_perms && (st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) return 0; This is always true when rsyncing AIX -> linux, look at this gdb output: (gdb) print /o st->st_mode $13 = 0100644 (gdb) print /o file->mode $14 = 0500644 Nasty AIX always adds 0400000 to the file mode which then breaks this condit...
2003 Apr 08
1
link_dest checks perms despite no -p -o or -g
When using --link-dest, this block of code in skip_file causes new copies of files to be created if source and destination file permissions differ, even if -p -o and -g haven't been specified. if (link_dest) { if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { return 0; } if (st->st_uid != file->uid || st->st_gid != file->gid) { return 0; } } I think the code should be this instead. if (link_dest) { if(preserve_perms && ((st->st_mode & ~_S_IFMT) != (file->mode &a...
2003 Mar 20
2
--link-dest uid/gid checking bug?
...12:24.994685000 -0500 @@ -27,6 +27,8 @@ extern int dry_run; extern int relative_paths; extern int preserve_links; +extern int preserve_uid; +extern int preserve_gid; extern int am_root; extern int preserve_devices; extern int preserve_hard_links; @@ -55,7 +57,8 @@ if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { return 0; } - if (st->st_uid != file->uid || st->st_gid != file->gid) { + if ((preserve_uid && st->st_uid != file->uid) || + (preserve_gid && st->st_gid != file->gid)) { return 0; } } ================...
2003 Nov 05
1
--link-dest
...erms; + extern int preserve_uid; + extern int preserve_gid; /* choose whether to skip a particular file */ *************** *** 51,63 **** if (st->st_size != file->length) { return 0; } ! if (link_dest) { ! if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { ! return 0; ! } ! if (st->st_uid != file->uid || st->st_gid != file->gid) { ! return 0; ! } } --- 54,64 ---- if (st->st_size != file-&g...
2002 Aug 02
1
[patch] --link-dest
...41,6 +41,7 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern int link_dest; /* choose whether to skip a particular file */ @@ -50,6 +51,15 @@ if (st->st_size != file->length) { return 0; } + if (link_dest) { + if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { + return 0; + } + if (st->st_uid != file->uid || st->st_gid != file->gid) { + return 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -356,6 +366,18 @@...
2003 Feb 08
1
compare st_mode & 07777, or Aix dirs always differ
...00010 +#endif +#ifndef S_IRWXO +#define S_IRWXO 00007 +#endif +#ifndef S_IROTH +#define S_IROTH 00004 +#endif +#ifndef S_IWOTH +#define S_IWOTH 00002 +#endif +#ifndef S_IXOTH +#define S_IXOTH 00001 #endif + +#define CHMOD_BITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) #ifndef _S_IFMT #define _S_IFMT 0170000 -- Roderick Schertler roderick@argon.org
2002 Oct 24
2
Feature Request: break hardlinks before metadata changes
[This email is either empty or too large to be displayed at this time]
2003 Mar 12
1
patch: typo's and gcc warnings
...the file exists already and we aren't perserving - presmissions then act as though the remote end sent + permissions then act as though the remote end sent us the file permissions we already have */ file->mode = (file->mode & _S_IFMT) | (st.st_mode & ~_S_IFMT); } diff -ru orig/rsync-2.5.6/receiver.c rsync-2.5.6/receiver.c --- orig/rsync-2.5.6/receiver.c 2003-01-21 00:32:17.000000000 +0100 +++ rsync-2.5.6/receiver.c 2003-03-10 16:28:10.000000000 +0100 @@ -396,8 +396,8 @@ } if (fd1 != -1 && !preserve_perms)...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...s_checksum; extern int modify_window; extern char *compare_dest; +extern int compare_perms; +extern int link_dest; /* choose whether to skip a particular file */ @@ -51,6 +53,15 @@ if (st->st_size != file->length) { return 0; } + if (compare_perms) { + if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { + return 0; + } + if (st->st_uid != file->uid || st->st_gid != file->gid) { + return 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -352,6 +363,17 @@...
2002 Mar 22
1
[PATCH] --link-dest option
...41,6 +41,7 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern int link_dest; /* choose whether to skip a particular file */ @@ -50,6 +51,15 @@ if (st->st_size != file->length) { return 0; } + if (link_dest) { + if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { + return 0; + } + if (st->st_uid != file->uid || st->st_gid != file->gid) { + return 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -382,6 +392,17 @@...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
...@ -48,8 +49,10 @@ static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st) { - if (st->st_size != file->length) { - return 0; + if (! times_only) { + if (st->st_size != file->length) { + return 0; + } } if (link_dest) { if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { @@ -59,6 +62,9 @@ return 0; } } + if (times_only) { + return (cmp_modtime(st->st_mtime,file->modtime) == 0); + } /* if always checksum is set then we use the checksum instead diff -ur rsync-2.5.6/options.c rsync-2.5.6-filtered/options.c...
2008 May 08
1
Patch to not modify files in place unless "--inplace" option specified
...CE(file->mode)) || (preserve_specials && IS_SPECIAL(file->mode))) { + int iflags = 0; uint32 *devp = F_RDEV_P(file); dev_t rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp)); if (statret == 0) { @@ -1609,7 +1623,15 @@ && BITS_EQUAL(sx.st.st_mode, file->mode, _S_IFMT) && sx.st.st_rdev == rdev) { /* The device or special file is identical. */ - set_file_attrs(fname, file, &sx, NULL, maybe_ATTRS_REPORT); + if (inplace) { + if (verbose > 2) + rprintf(FINFO, "possibly tweaking attributes of %s\n", fname); + set_...