s3-utils: Do not disable the root check in smbpasswd.
authorAndreas Schneider <asn@samba.org>
Wed, 2 Apr 2014 13:42:29 +0000 (15:42 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Apr 2014 12:56:05 +0000 (14:56 +0200)
We will run uid_wrapper as root so that this succeeds.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/utils/smbpasswd.c

index 67780ff7cd6b6ff55fbd0a8dce2717367ff00d0f..fc7b0710b6d4b6430d128f734adc2e2d2362d6c3 100644 (file)
@@ -97,12 +97,10 @@ static int process_options(int argc, char **argv, int local_flags)
        while ((ch = getopt(argc, argv, "c:axdehminjr:sw:R:D:U:LW")) != EOF) {
                switch(ch) {
                case 'L':
-#if !defined(NSS_WRAPPER)
                        if (getuid() != 0) {
                                fprintf(stderr, "smbpasswd -L can only be used by root.\n");
                                exit(1);
                        }
-#endif
                        local_flags |= LOCAL_AM_ROOT;
                        break;
                case 'c':