search for: set_perms

Displaying 20 results from an estimated 47 matches for "set_perms".

Did you mean: set_perm
2004 May 10
2
read error produces null-byte-filled destination file
I've run into a bug in the IO handling when reading a file. Suppose I have a file that lives on an NFS filesystem. That filesystem is NOT being exported with auth=0 permissions. So, if I try to access a file as root, it successfully opens the file, but subsequent reads fail with EACCES. This produces a destination file full of null bytes. I noticed this with 2.5.7, but checked 2.6.2 as
2003 May 21
2
patch to avoid race condition in rsync 2.5.6
...src-2.5.6/rsync.c 2001-12-20 16:33:13.000000000 +0100 +++ src-2.5.6-local/rsync.c 2003-05-20 15:17:56.000000000 +0200 @@ -237,6 +237,9 @@ if (make_backups && !make_backup(fname)) return; + /* change permissions before putting the file in place */ + set_perms(fnametmp,file,NULL,0); + /* move tmp file over real file */ if (robust_rename(fnametmp,fname) != 0) { if (errno == EXDEV) { @@ -253,7 +256,5 @@ fnametmp,fname,strerror(errno)); } do_unlink(fnametmp); -...
2011 Nov 29
2
[PATCH] docs: XenBus page has been transfered to new wiki
...page has been transfered to new wiki Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com> diff -r fa9deee858b8 -r 6da8c30fb198 docs/misc/xenstore.txt --- a/docs/misc/xenstore.txt Tue Nov 29 11:07:59 2011 +0000 +++ b/docs/misc/xenstore.txt Tue Nov 29 12:00:55 2011 +0000 @@ -159,7 +159,7 @@ SET_PERMS <path>|<perm-as-string>|+? r<domid> read only b<domid> both read and write n<domid> no access - See http://wiki.xensource.com/xenwiki/XenBus section + See http://wiki.xensource.com/wiki/XenBus section `Permissions'' for details of the permissions sy...
2004 Feb 17
1
[patch] Make robust_rename() handle EXDEV.
.../* rename failed on cross-filesystem link. - Copy the file instead. */ - if (copy_file(fnametmp,fname, file->mode & INITACCESSPERMS)) { - rprintf(FERROR, "copy %s -> \"%s\": %s\n", - full_fname(fnametmp), fname, - strerror(errno)); - } else { - set_perms(fname,file,NULL,0); - } - } else { - rprintf(FERROR,"rename %s -> \"%s\": %s\n", - full_fname(fnametmp), fname, strerror(errno)); - } - do_unlink(fnametmp); + rprintf(FERROR,"rename %s -> \"%s\": %s\n", + full_fname(fnametmp), fname, strerr...
2008 Sep 17
1
How do you change XenStore permissions?
Hi, Is there a way to change the permission for a specific path in XenStore? And can you do that from with in a C program? Thanks Julian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2001 Dec 04
1
-v prints directories twice
...nc CVS as one of the small changes I put in. - Dave Dykstra --- generator.c.O Mon Dec 3 12:29:31 2001 +++ generator.c Mon Dec 3 12:27:04 2001 @@ -247,7 +247,9 @@ fname,strerror(errno)); } } - if (set_perms(fname,file,NULL,0) && verbose) + /* f_out is set to -1 when doing final directory + permission and modification time repair */ + if (set_perms(fname,file,NULL,0) && verbose && (f_out != -1)) rprintf(FINF...
2002 Mar 06
2
Compile 2.5.2 on RedHat 6.2
...ion of `basename' rsync.h:350: `link' redeclared as different kind of symbol /usr/include/unistd.h:678: previous declaration of `link' rsync.h:352: parse error before `}' rsync.h: In function `flist_up': rsync.h:420: dereferencing pointer to incomplete type rsync.c: In function `set_perms': rsync.c:165: dereferencing pointer to incomplete type rsync.c:168: dereferencing pointer to incomplete type rsync.c:178: dereferencing pointer to incomplete type rsync.c:179: dereferencing pointer to incomplete type rsync.c:179: dereferencing pointer to incomplete type rsync.c:184: dereferenc...
2005 Mar 31
2
Some files not logged when using --compare-dest. Bug?
Hi again. I just spotted another peculiarity when inspecting the rsync log. When using --compare-dest, source files that have permissions that differ from the "comparables" are not logged, unless you're using -i. Here's a testing session: $ ls -lR .: total 12 drwxr-xr-x 2 vidar users 4096 2005-03-31 14:16 cmp/ drwxr-xr-x 2 vidar users 4096 2005-03-31 14:23 dst/
2009 May 19
1
re-sending outstanding controller refactoring patches after rebase
I've rebased the patch series to the current next branch and am sending them again.
2003 Sep 05
1
new option suggestion '--backup-only'
...T) { if (!(relative_paths && errno==ENOENT && create_directory_path(fname, orig_umask)==0 && @@ -357,6 +365,8 @@ * right place -- no further action * required. */ if (strcmp(lnk,file->link) == 0) { + if (backup_only) + return; set_perms(fname,file,&st,1); return; } @@ -364,8 +374,12 @@ /* Not a symlink, so delete whatever's * already there and put a new symlink * in place. */ + if (backup_only) + return; delete_file(fname); } + if (backup_only) + return; if (do_symlink(file->li...
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...vm_pools) + json_tree_internal(:svc_show, :select_hardware_and_vm_pools) end def json_move_tree - json_tree_internal(Privilege::MODIFY, :select_hardware_pools) - end - def json_tree_internal(privilege, filter_method) - id = params[:id] - if id - @pool = Pool.find(id) - set_perms(@pool) - return unless authorize_action(privilege) - end + json_tree_internal(:svc_modify, :select_hardware_pools) + end + def json_tree_internal(perm_method, filter_method) + self.send(perm_method, params[:id]) if params[:id] if @pool pools = @pool.children open_...
2002 Dec 17
2
Statistics appearing in middle of file list -- no errors
Has anybody seen this? We want to seperate the statistics out from the file list, and were using tail to grab the end of the file. the command we run is: rsync -r -a -z --partial --suffix=".backup" --exclude="*.backup" \ --stats -v /. 10.1.1.60::cds101/ > /var/log/rsync.log 2>&1 along with a number of excludes to skip the /tmp, /dev,
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
..., char *fnametmp, struct file_struct *file) { + int error = 0; + if (make_backups && !make_backup(fname)) return; @@ -243,17 +246,25 @@ rprintf(FERROR, "copy %s -> \"%s\": %s\n", full_fname(fnametmp), fname, strerror(errno)); - } else { - set_perms(fname,file,NULL,0); + error = 1; } } else { rprintf(FERROR,"rename %s -> \"%s\": %s\n", full_fname(fnametmp), fname, strerror(errno)); + error = 1; } - do_unlink(fnametmp); - } else { - set_perms(fname,file,NULL,0); } + + do_unlink(fnametmp); + if...
2002 Apr 03
3
metadata in dryrun mode
As I reported a while back rsync doesn't handle metadata (permissions and ownership) in dryrun mode. I offered to make a patch and that offer still stands. I didn't have the time for it until now and want to pick it up again. I had some ugly hack back then but I want to redo it in a clean way. I would like some input on my thoughts. IMHO, it would be ideally if the check for dry_run
2002 Dec 05
1
Patch to ignore exluded files.
...> --- rsync.c.orig Fri Jul 19 13:37:25 2002 > +++ rsync.c Fri Jul 19 13:36:42 2002 > @@ -236,13 +236,15 @@ > { > if (make_backups && !make_backup(fname)) > return; > + /* eric: set permisions before moving file */ > + set_perms(fnametmp, file, NULL, 0); > > /* move tmp file over real file */ > if (robust_rename(fnametmp,fname) != 0) { > if (errno == EXDEV) { > /* rename failed on cross-filesystem link. > Copy the file ins...
2004 May 06
2
rsync-2.6.2: NFS clients confused after an rsync
We use rsync to update an nfs server. After an update, we noticed that a large number of clients didn't see the updated data. It took me a while to be able to reliably reproduce this problem, but it happens on old and new versions of rysnc. It also happens across all the platforms we use here (sun/linux/netapp). This shows the problem: [Note my home directory is NFS mounted]
2002 Mar 07
0
make error during rsync-up
...ion of `basename' rsync.h:350: `link' redeclared as different kind of symbol /usr/include/unistd.h:678: previous declaration of `link' rsync.h:352: parse error before `}' rsync.h: In function `flist_up': rsync.h:420: dereferencing pointer to incomplete type rsync.c: In function `set_perms': rsync.c:165: dereferencing pointer to incomplete type rsync.c:168: dereferencing pointer to incomplete type rsync.c:178: dereferencing pointer to incomplete type rsync.c:179: dereferencing pointer to incomplete type rsync.c:179: dereferencing pointer to incomplete type rsync.c:184: dereferenc...
2002 Jul 24
0
couple of minor fixes to rsync 2.5.5
...set. So I fixed it with following diff: --- rsync.c.orig Fri Jul 19 13:37:25 2002 +++ rsync.c Fri Jul 19 13:36:42 2002 @@ -236,13 +236,15 @@ { if (make_backups && !make_backup(fname)) return; + /* eric: set permisions before moving file */ + set_perms(fnametmp, file, NULL, 0); /* move tmp file over real file */ if (robust_rename(fnametmp,fname) != 0) { if (errno == EXDEV) { /* rename failed on cross-filesystem link. Copy the file instead. */ -...
2004 Apr 30
1
--backup requires remote connection?
Does the --backup, --backup-dir set require that either then source or target be a remote connection? Test folder hierarchy: /Users/localskaiser/source/myfile.txt /Users/localskaiser/source/a/b/c/newfile.txt /Users/localskaiser/target /Users/localskaiser/archive I can not get the following command to work (after running it once, and then modifying newfile.txt): [skaiser-pbg4:~] localska%
2002 Jun 21
1
small security-related rsync extension
...) == 0) { X! return 0; X! } else if (verbose > 1) { X! rprintf(FINFO,"Stripped setuid and/or setgid from %s\n",fnamebak); X! } X! #endif X } X+ X return 1; X } X X*************** X*** 271,276 **** X--- 303,314 ---- X fname, keep_name, strerror(errno)); X }; X set_perms (keep_name, file, NULL, 0); X+ /* may mean an extra stat */ X+ #ifdef HAVE_CHMOD X+ if (!priv_backups && strip_perm(keep_name) == 0) { X+ return 0; X+ } X+ #endif X free_file (file); X free (file); X SHAR_EOF $TOUCH -am 06211315102 backup-priv-backups && chmod 0644 backup...