poptSetOtherOptionHelp(pc, "<profilefile>");
+ ZERO_STRUCT(old_sid);
+ ZERO_STRUCT(new_sid);
+
/* Now, process the arguments */
while ((opt = poptGetNextOpt(pc)) != -1) {
exit(1);
}
- if ((!change && new_val) || (change && !new_val)) {
+ if (!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);
}
ndr_err = ndr_push_struct_blob(&old_blob, frame, &old_sid,
- (ndr_push_flags_fn_t) ndr_push_security_descriptor);
+ (ndr_push_flags_fn_t) ndr_push_dom_sid);
+ SMB_ASSERT(NDR_ERR_CODE_IS_SUCCESS(ndr_err));
+
ndr_err = ndr_push_struct_blob(&new_blob, frame, &new_sid,
- (ndr_push_flags_fn_t) ndr_push_security_descriptor);
+ (ndr_push_flags_fn_t) ndr_push_dom_sid);
+ SMB_ASSERT(NDR_ERR_CODE_IS_SUCCESS(ndr_err));
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) {