summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-30 14:17:02 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:11 +1000
commit4080ff7af5eec946a01c52f8d9ba01f1ef81fe71 (patch)
treecc50d2c7d8460563788a98be4fcc7aaac9a918e8 /source3/utils
parent71832a404e5028c1c3933351c608a99e4fc80e42 (diff)
downloadsamba-4080ff7af5eec946a01c52f8d9ba01f1ef81fe71.tar.gz
samba-4080ff7af5eec946a01c52f8d9ba01f1ef81fe71.tar.bz2
samba-4080ff7af5eec946a01c52f8d9ba01f1ef81fe71.zip
s3-privs Make privilege_enum_sids() take an LUID, not a bitmap
This moves one more privileges call away from direct bitmap manipuation. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_sam.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 4da712d8cc..53e8c96f63 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -634,7 +634,7 @@ static int net_sam_policy(struct net_context *c, int argc, const char **argv)
static int net_sam_rights_list(struct net_context *c, int argc,
const char **argv)
{
- uint64_t mask;
+ enum sec_privilege privilege;
if (argc > 1 || c->display_usage) {
d_fprintf(stderr, "%s\n%s",
@@ -653,12 +653,14 @@ static int net_sam_rights_list(struct net_context *c, int argc,
return 0;
}
- if (se_priv_from_name(argv[0], &mask)) {
+ privilege = sec_privilege_id(argv[0]);
+
+ if (privilege != SEC_PRIV_INVALID) {
struct dom_sid *sids;
int i, num_sids;
NTSTATUS status;
- status = privilege_enum_sids(&mask, talloc_tos(),
+ status = privilege_enum_sids(privilege, talloc_tos(),
&sids, &num_sids);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, _("Could not list rights: %s\n"),