search for: am_root

Displaying 20 results from an estimated 40 matches for "am_root".

2017 Oct 31
0
[Bug 13113] New: receive_xattr heap overflow when prepending RSYNC_PREFIX
...Priority: P5 Component: core Assignee: wayned at samba.org Reporter: jeriko.one at gmx.us QA Contact: rsync-qa at samba.org Created attachment 13745 --> https://bugzilla.samba.org/attachment.cgi?id=13745&action=edit change MIGHT_NEED_RPRE to am_root <= 0 $ ./rsync -v rsync version 3.1.3dev protocol version 31 I've built with HAVE_LINUX_XATTRS I'm running rsyncd as a non root user. the args I'm sending rsyncd when connecting are {"--server", "--filter", "+x jk", "-X", "."...
2017 May 26
9
[Bug 12806] New: Deleting in a row of hardlinked snapshots resets file permissions.
https://bugzilla.samba.org/show_bug.cgi?id=12806 Bug ID: 12806 Summary: Deleting in a row of hardlinked snapshots resets file permissions. Product: rsync Version: 3.1.0 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: core
2006 Jun 02
3
[PATCH] --omit-dir-changes, qsort<>mergesort issues
...rn int omit_dir_changes; extern int delete_mode; extern int delete_before; extern int delete_during; @@ -348,10 +349,11 @@ iflags |= ITEM_REPORT_TIME; if ((file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; - if (preserve_uid && am_root && file->uid != st->st_uid) + if (preserve_uid && am_root && file->uid != st->st_uid + && !(S_ISDIR(st->st_mode) && omit_dir_changes)) iflags |= ITEM_REPORT_OWNER; - if (preserve_gid && file->gid != GID_NONE - &&a...
2016 Dec 01
3
[PATCH v2 1/2] xattrs: Skip security.evm extended attribute
...AS_PREFIX(name, SYSTEM_PREFIX)) continue; + + if (!strcmp(name, "security.evm")) + continue; #endif datum_len = 0; @@ -828,7 +834,9 @@ void receive_xattr(int f, struct file_struct *file) } #ifdef HAVE_LINUX_XATTRS /* Non-root can only save the user namespace. */ - if (am_root <= 0 && !HAS_PREFIX(name, USER_PREFIX)) { + if (am_root <= 0 && + (!HAS_PREFIX(name, USER_PREFIX) || + !strcmp(name, "security.evm"))) { if (!am_root) { free(ptr); continue; @@ -962,6 +970,11 @@ static int rsync_xal_set(const char *fname, it...
2017 Jun 08
0
[Bug 12806] Deleting in a row of hardlinked snapshots resets file permissions.
...erg diff --git a/delete.c b/delete.c index 88e4230..223b6d2 100644 --- a/delete.c +++ b/delete.c @@ -97,10 +97,10 @@ static enum delret delete_dir_contents(char *fname, uint16 flags) } strlcpy(p, fp->basename, remainder); - if (!(fp->mode & S_IWUSR) && !am_root && fp->flags & FLAG_OWNED_BY_US) - do_chmod(fname, fp->mode | S_IWUSR); /* Save stack by recursing to ourself directly. */ if (S_ISDIR(fp->mode)) { + if (!(fp->mode & S_IWUSR) && !am_root && fp->flags & FLAG_...
2023 May 17
1
[PATCH] Add --omit-{device,special}-times options
...&omit_special_times, 1, 0, 0 }, + {"no-omit-special-times",0, POPT_ARG_VAL, &omit_special_times, 0, 0, 0 }, {"modify-window", '@', POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 }, {"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 }, {"no-super", 0, POPT_ARG_VAL, &am_root, 0, 0, 0 }, @@ -2815,6 +2821,10 @@ void server_options(char **args, int *argc_p) args[ac++] = "--size-only"; if (do_stats) args[ac++] = "--stats"; + if (omit_device_times) + args[ac++]...
2004 Jan 26
1
patch for linux capabilities
...} +#endif + if (setuid(uid)) { rsyserr(FERROR, errno, "setuid %d failed", (int) uid); io_printf(f_out, "@ERROR: setuid failed\n"); return -1; } +#ifdef HAVE_LINUX_CAPS + cap_set_flag(cp, CAP_EFFECTIVE, 2, newcaps, CAP_SET); + cap_set_proc(cp); +#endif + am_root = (getuid() == 0); }
2003 Mar 20
2
--link-dest uid/gid checking bug?
...=============================== --- generator.c.orig 2003-03-19 15:07:29.592476000 -0500 +++ generator.c 2003-03-19 16: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 !=...
2017 Oct 31
2
[Bug 13112] New: receive_xattr heap overread with non null terminated name and xattr filter
https://bugzilla.samba.org/show_bug.cgi?id=13112 Bug ID: 13112 Summary: receive_xattr heap overread with non null terminated name and xattr filter Product: rsync Version: 3.1.3 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: core
2001 Nov 20
2
rsync server over SSH [includes code patches]
...)-2; gid_t gid = (gid_t)-2; char *p; ! char *addr = client_addr(fd); ! char *host = client_name(fd); char *name = lp_name(i); int use_chroot = lp_use_chroot(i); int start_glob=0; int ret; char *request=NULL; extern int am_sender; extern int remote_version; extern int am_root; if (!allow_access(addr, host, lp_hosts_allow(i), lp_hosts_deny(i))) { rprintf(FERROR,"rsync denied on module %s from %s (%s)\n", ! name, client_name(fd), client_addr(fd)); ! io_printf(fd,"@ERROR: access denied to %s from %s (%s)\n", ! name, client_name(fd),...
2008 Feb 15
4
Revised flags patch
...24:58 2008 +++ rsync-3.0.0pre9-flags/rsync.c Fri Feb 15 19:39:33 2008 @@ -32,6 +32,7 @@ extern int dry_run; extern int preserve_acls; extern int preserve_xattrs; extern int preserve_perms; +extern int preserve_fileflags; extern int preserve_executability; extern int preserve_times; extern int am_root; @@ -60,6 +61,16 @@ iconv_t ic_chck = (iconv_t)-1; iconv_t ic_send = (iconv_t)-1, ic_recv = (iconv_t)-1; # endif +#ifdef SUPPORT_FLAGS +#ifndef UF_NOUNLINK +#define UF_NOUNLINK 0 +#endif +#ifndef SF_NOUNLINK +#define SF_NOUNLINK 0 +#endif +#define NOCHANGE_FLAGS (UF_IMMUTABLE|UF_APPEND|UF_NOUNL...
2012 Jun 09
2
[patch] NFSv4/ZFS ACLs
This is a PoC patch for NFSv4/ZFS ACLs. The objective of the patch is that rsync --acls support NFSv4/ZFS ACLs without requiring a new command line option NFSv4 ACLs can't be represented using POSIX draft ACLs, if an NFSv4 ACL is present a separate POSIX draft ACL will not be present and there are new APIs to access NFSv4 ACLs. So we need to distinguish between NFSv4 ACLs and POSIX ACLs in
2003 Jun 30
2
--link-dest non-optimal without --owner (or when not root)
If I run rsync 2.5.6 not as root, so that the -o (--owner) and -g (--group) flags don't work, then files that are not owned by me in the source directory will not be linked by --link-dest. When rsync looks in my link-dest, it sees a file owned by me. When it compares that with the source file not owned by me, then rsync thinks it cannot skip that file, and no hard link results. However,
2004 Jan 19
1
File that "vanish"es between readdir and stat is not IO error
Using rsync 2.6.0 with --verbose and doing a pull. >?receiving file list ... readlink "{FILENAME}" failed: >?No such file or directory >?done >?IO error encountered - skipping file deletion The file was a temporary file that was being deleted just as the rsync was run. So while the file list was being built, it was there when the directory was read but had vanished by the
2004 May 07
2
@ERROR: auth failed on module -- PROBLEM SOLVED!
The man page for rsync(1) states: --password-file This option allows you to provide a password in a file for accessing a remote rsync server. Note that this option is only useful when accessing an rsync server using the built in trans- port, not when using a remote shell as the transport. The file must not be world readable. It should contain just the password as a single line.
2005 Jul 26
1
itemize() needs to use CHMOD_BITS (patch)
...->st_mtime) != 0)) iflags |= ITEM_REPORT_TIME; - if (preserve_perms && file->mode != st->st_mode) + if (preserve_perms && (st->st_mode & CHMOD_BITS) + != (file->mode & CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; if (preserve_uid && am_root && file->uid != st->st_uid) iflags |= ITEM_REPORT_OWNER; -- Roderick Schertler roderick@argon.org
2010 Nov 23
0
[PATCH 1/3] Add fadvise interface wrapper
...++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/syscall.c b/syscall.c index cfabc3e..9f5b1c3 100644 --- a/syscall.c +++ b/syscall.c @@ -28,6 +28,7 @@ #ifdef HAVE_SYS_ATTR_H #include <sys/attr.h> #endif +#include <fcntl.h> extern int dry_run; extern int am_root; @@ -282,3 +283,13 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence) return lseek(fd, offset, whence); #endif } + +#if _XOPEN_SOURCE >= 600 +int do_fadvise(int fd, OFF_T offset, OFF_T len, int advise) +{ + return posix_fadvise(fd, offset, len, advise); +} +#else +#define do_fadvise(...
2004 Mar 17
1
setgid on directories
...2 12:16:11 2004 @@ -41,6 +41,7 @@ extern int modify_window; extern char *compare_dest; extern int link_dest; +extern int setgid_dirs; /* choose whether to skip a particular file */ @@ -557,6 +558,11 @@ them. This is then fixed after the files are transferred */ if (!am_root && S_ISDIR(file->mode)) { file->mode |= S_IWUSR; /* user write */ + + if( setgid_dirs){ + file->mode |= S_ISGID; + } + /* XXX: Could this be causing a problem on SCO? Perhaps their * handling of permissions is...
2013 Oct 24
0
patch for combining detect-renamed and fileflags patches (fwd)
...curse(void) +@@ -125,6 +126,7 @@ allow_inc_recurse = 0; else if (!am_sender && (delete_before || delete_after @@ -61,15 +61,15 @@ diff --git a/delete.c b/delete.c --- a/delete.c +++ b/delete.c -@@ -25,6 +25,7 @@ +@@ -23,6 +23,7 @@ + #include "rsync.h" + extern int am_root; ++extern int detect_renamed; extern int make_backups; extern int max_delete; -+extern int detect_renamed; - extern char *backup_dir; - extern char *backup_suffix; - extern int backup_suffix_len; -@@ -44,6 +45,8 @@ static inline int is_backup_file(char *fn) + extern int force_change; +@@ -45,6...
2005 May 31
0
[Bug 2758] New: "File exists" error using options -b and --backup-dir with device files.
...keep_backup(char *fname) { - STRUCT_STAT st; + STRUCT_STAT st, bufst; struct file_struct *file; char *buf; int kept = 0; @@ -190,6 +190,12 @@ /* Check to see if this is a device file, or link */ if (IS_DEVICE(file->mode)) { if (am_root && preserve_devices) { + /* delete backup_dir destination device if it exists */ + if (do_stat(buf, &bufst) == 0 && IS_DEVICE(bufst.st_mode)) { + if (do_unlink(buf) < 0) +...