From: Noel Power Date: Thu, 11 Aug 2022 14:26:01 +0000 (+0100) Subject: s3/utils: Add save and restore config switches (and help output) X-Git-Tag: talloc-2.4.2~771 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1273f9a2a514310577759b906c9689d7fd15698b;p=thirdparty%2Fsamba.git s3/utils: Add save and restore config switches (and help output) Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index a9d01a1fd9e..93323aa33e9 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -38,6 +38,8 @@ static char DIRSEP_CHAR = '\\'; static int inheritance = 0; +static const char *save_file = NULL; +static const char *restore_file = NULL; static int test_args; static int sddl; static int query_sec_info = -1; @@ -1576,6 +1578,26 @@ int main(int argc, char *argv[]) .val = 1, .descrip = "Supports propagation of inheritable ACE(s) when used in conjunction with add, delete, set or modify", }, + { + .longName = "save", + .shortName = 0, + .argInfo = POPT_ARG_STRING, + .arg = &save_file, + .val = 1, + .descrip = "stores the DACLs in sddl format of the " + "specified file or folder for later use " + "with restore. SACLS, owner or integrity" + " labels are not stored", + }, + { + .longName = "restore", + .shortName = 0, + .argInfo = POPT_ARG_STRING, + .arg = &restore_file, + .val = 1, + .descrip = "applies the stored DACLS to files in " + "directory.", + }, { .longName = "numeric", .shortName = 0,