Revert "profiles"
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Sep 2016 15:51:49 +0000 (17:51 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Oct 2016 12:52:17 +0000 (14:52 +0200)
This reverts commit 95c041553dcd3d786c44556db2ef70db98385ddf.

source3/utils/profiles.c

index 1ef4b43203d81ca7227ecabc996066c636506cb3..d128d6d1d674e88d4857b45c42662707a649cdd6 100644 (file)
@@ -238,9 +238,6 @@ int main( int argc, const char *argv[] )
 
        poptSetOtherOptionHelp(pc, "<profilefile>");
 
-       ZERO_STRUCT(old_sid);
-       ZERO_STRUCT(new_sid);
-
        /* Now, process the arguments */
 
        while ((opt = poptGetNextOpt(pc)) != -1) {
@@ -273,7 +270,7 @@ int main( int argc, const char *argv[] )
                exit(1);
        }
 
-       if (!change || !new_val) {
+       if ((!change && new_val) || (change && !new_val)) {
                fprintf(stderr, "You must specify both -c and -n if one or the other is set!\n");
                poptPrintUsage(pc, stderr, 0);
                exit(252);
@@ -298,18 +295,12 @@ int main( int argc, const char *argv[] )
        }
 
        ndr_err = ndr_push_struct_blob(&old_blob, frame, &old_sid,
-                       (ndr_push_flags_fn_t) ndr_push_dom_sid);
-       SMB_ASSERT(NDR_ERR_CODE_IS_SUCCESS(ndr_err));
-
+                       (ndr_push_flags_fn_t) ndr_push_security_descriptor);
        ndr_err = ndr_push_struct_blob(&new_blob, frame, &new_sid,
-                       (ndr_push_flags_fn_t) ndr_push_dom_sid);
-       SMB_ASSERT(NDR_ERR_CODE_IS_SUCCESS(ndr_err));
+                       (ndr_push_flags_fn_t) ndr_push_security_descriptor);
 
        if (new_blob.length > old_blob.length) {
-               fprintf(stderr, "New SID[%s][%u] is longer than old SID[%s][%u]]\n",
-                       sid_string_dbg(&new_sid), (unsigned)new_blob.length,
-                       sid_string_dbg(&old_sid), (unsigned)old_blob.length);
-               exit (1);
+
        }
 
        if (new_blob.length < old_blob.length) {