Elided error codes in error messages in the net command ...
Richard Sharpe
realrichardsharpe at gmail.com
Tue Apr 7 02:15:40 GMT 2009
Hi,
I have recently been bitten by code like this in utils/net_groupmap.c
if (!NT_STATUS_IS_OK(pdb_add_aliasmem(&alias, &member))) {
d_fprintf(stderr, "Could not add sid %s to alias %s\n",
argv[1], argv[0]);
return -1;
}
Unfortunately, since pdb_add_aliasmem can return something like three
different error codes, it takes a great deal of digging to figure out
what the problem is.
It really should be something like:
err = pdb_add_aliasmem(&alias, &member);
if (!NT_STATUS_IS_OK(err)) {
d_fprintf(stderr, "Could not add sid %s to alias %s (%s)\n",
argv[1], argv[0], nt_errstr(err));
return -1;
}
Is there any interest in getting this fixed? I could probably run AWK
over the offending code!
--
Regards,
Richard Sharpe
More information about the samba-technical
mailing list