diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-02-14 18:26:53 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-02-14 18:26:53 +0000 |
commit | 2983dc83d46fc56d0283a725bd00db4ff2b11e6f (patch) | |
tree | 46d2587645355f7ef0df39baabe9d67320069228 /usr.bin/rsync/fargs.c | |
parent | 6fb206e1e9f8f2e247e313f7f53378ae120d1504 (diff) |
sync with kristaps, commit c5350b9055c3921001778275bb808a5c811c21c1
Protocol-level support for -o. The actual sharing itself is more or less a
copy of the existing -g code. I've refactored a lot of the ids.c code to be
generic and only accept a "isgid", as the rest is the same. So there's some
churn as I make all references to "group" be generic.
Diffstat (limited to 'usr.bin/rsync/fargs.c')
-rw-r--r-- | usr.bin/rsync/fargs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/rsync/fargs.c b/usr.bin/rsync/fargs.c index 2a35291f811..280782aa118 100644 --- a/usr.bin/rsync/fargs.c +++ b/usr.bin/rsync/fargs.c @@ -1,4 +1,4 @@ -/* $Id: fargs.c,v 1.9 2019/02/13 19:13:18 deraadt Exp $ */ +/* $Id: fargs.c,v 1.10 2019/02/14 18:26:52 florian Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -43,7 +43,7 @@ fargs_cmdline(struct sess *sess, const struct fargs *f) argsz += 1; /* dot separator */ argsz += 1; /* sink file */ argsz += 5; /* per-mode maximum */ - argsz += 11; /* shared args */ + argsz += 12; /* shared args */ argsz += 1; /* NULL pointer */ argsz += f->sourcesz; @@ -97,6 +97,8 @@ fargs_cmdline(struct sess *sess, const struct fargs *f) args[i++] = "-l"; if (sess->opts->dry_run) args[i++] = "-n"; + if (sess->opts->preserve_uids) + args[i++] = "-o"; if (sess->opts->preserve_perms) args[i++] = "-p"; if (sess->opts->recursive) |