search for: make_mut

Displaying 9 results from an estimated 9 matches for "make_mut".

Did you mean: cmake_mt
2011 Mar 16
3
[Bug 8019] New: Various improvements to the fileflags patch
...veral changes to the fileflags.diff patch The attached patch improves the following: - The fileflags variable was occasionally referenced without being initialized - sx.st.st_flags is initialized in flist.c:send_file_name() so get_xattr has access to fileflags - rsync.c: Errors that occur in undo_make_mutable are now reported (I think this also resolves an issue in which rsync would report "Unknown error (0)") - rsync.c: make_mutable is now called in set_file_attrs allowing set_file_attrs to apply acls, xattrs, times, etc. to files in locked directories. - syscall.c: Added make_mutable/for...
2008 Feb 15
4
Revised flags patch
...Mon Sep 24 00:19:55 2007 +++ rsync-3.0.0pre9-flags/backup.c Fri Feb 15 19:33:09 2008 @@ -61,7 +61,17 @@ static int make_simple_backup(const char return 0; while (1) { - if (do_rename(fname, fnamebak) == 0) { +#ifdef SUPPORT_FLAGS + STRUCT_STAT st2; + + link_stat(fname, &st2, 0); + make_mutable(fname, st2.st_mode, st2.st_flags); +#endif + if (do_rename(fname, fnamebak) == 0) + { +#ifdef SUPPORT_FLAGS + undo_make_mutable(fnamebak, st2.st_mode, st2.st_flags); +#endif if (verbose > 1) { rprintf(FINFO, "backed up %s to %s\n", fname, fnamebak); diff -brp...
2012 May 07
0
Solved problem with hard links and schg flag under FreeBSD
...har *fname2) { if (dry_run) return 0; RETURN_ERROR_IF_RO_OR_LO; if (link(fname1, fname2) == 0) return 0; #ifdef SUPPORT_FORCE_CHANGE if (force_change && (errno == EPERM || errno == EACCES)) { char parent[MAXPATHLEN]; int parent_flags; int saved_errno = errno; int file_flags = make_mutable(fname1, NULL, NO_FFLAGS, force_change); if (file_flags) { int ret = link(fname1, fname2); undo_make_mutable(fname1, file_flags); if (ret == 0) return 0; } parent_flags = make_parentdir_mutable(fname2, force_change, parent, sizeof parent); if (parent_flags) { int r...
2009 Mar 11
0
Odd issue with locked directories and Mac OS X
...nt cleanup_got_literal; @@ -153,6 +157,20 @@ } #endif +#ifdef SUPPORT_FORCE_CHANGE + if (fd == -1) { + stat_x sx; + if (do_stat(file->dirname, &sx.st) < 0) + rprintf(FINFO, "Failed to stat %s!\n", full_fname(file->dirname)); + else { + if (force_change && make_mutable(file->dirname, sx.st.st_mode, sx.st.st_flags, force_change) > 0) { + fd = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); + undo_make_mutable(file->dirname, sx.st.st_flags); + } + } + } +#endif + if (fd == -1) { rsyserr(FERROR_XFER, errno, "mkstemp %s...
2009 Oct 01
0
patch: --force-change for hard links
...eturn link(fname1, fname2); + if (link(fname1, fname2) == 0) + return 0; +#ifdef SUPPORT_FORCE_CHANGE + if (force_change && errno == EPERM) { + STRUCT_STAT st; + + if (x_lstat(fname1, &st, NULL) == 0 + && make_mutable(fname1, st.st_mode, st.st_flags, force_change) > 0) { + int ret = link(fname1, fname2); + undo_make_mutable(fname1, st.st_flags); + if (ret == 0) + return 0; + } +...
2008 Apr 14
0
[PATCH] xattrs not set on locked files that already exist on target
...orce_change; extern int preserve_perms; extern int preserve_fileflags; extern int preserve_executability; @@ -445,6 +446,11 @@ if (daemon_chmod_modes && !S_ISLNK(new_mode)) new_mode = tweak_mode(new_mode, daemon_chmod_modes); +#ifdef SUPPORT_FORCE_CHANGE + if (force_change) + make_mutable(fname, sxp->st.st_mode, sxp->st.st_flags, force_change); +#endif + #ifdef SUPPORT_ACLS if (preserve_acls && !S_ISLNK(file->mode) && !ACL_READY(*sxp)) get_acl(fname, sxp); ## Note: I'm not using undo_make_mutable because set_fileflags is called at the e...
2008 Jun 25
2
DO NOT REPLY [Bug 5565] New: xattrs not set on locked files that already exist on target
..._perms; extern int preserve_fileflags; extern int preserve_executability; @@ -445,6 +446,11 @@ if (daemon_chmod_modes && !S_ISLNK(new_mode)) new_mode = tweak_mode(new_mode, daemon_chmod_modes); +#ifdef SUPPORT_FORCE_CHANGE + if (force_change) + make_mutable(fname, sxp->st.st_mode, sxp->st.st_flags, force_change); +#endif + #ifdef SUPPORT_ACLS if (preserve_acls && !S_ISLNK(file->mode) && !ACL_READY(*sxp)) get_acl(fname, sxp); ## Note: I'm not using undo_make_mutable because set_fileflags is ca...
2006 Aug 02
7
DO NOT REPLY [Bug 3988] New: -a collides with --flags
https://bugzilla.samba.org/show_bug.cgi?id=3988 Summary: -a collides with --flags Product: rsync Version: 2.6.8 Platform: x86 OS/Version: FreeBSD Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: rsync@oldach.net QAContact:
2008 Mar 04
1
Several changes missing from [HEAD] fileflags.diff
...as_tr_sh` > diff -up a/proto.h b/proto.h > --- a/proto.h > +++ b/proto.h > @@ -269,6 +269,8 @@ int read_ndx_and_attrs(int f_in, int *if > void free_sums(struct sum_struct *s); > mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms, > int exists); > +int make_mutable(const char *fname, mode_t mode, uint32 fileflags, > uint32 iflags); > +int undo_make_mutable(const char *fname, uint32 fileflags); > int set_file_attrs(const char *fname, struct file_struct *file, > stat_x *sxp, > const char *fnamecmp, int flags); > RETSIGTYPE sig_...