The Samba-Bugzilla – Attachment 4297 Details for
Bug 6328
net sam rights; one should be able to specify more than one right at a time(like net rpc rights)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix that has been pushed to master, should also apply to 3.4
net_sam_rights_grant.diff (text/plain), 1.59 KB, created by
Guenther Deschner
on 2009-06-17 05:42:00 UTC
(
hide
)
Description:
fix that has been pushed to master, should also apply to 3.4
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2009-06-17 05:42:00 UTC
Size:
1.59 KB
patch
obsolete
>From 5a8483ea742a2f7f043e62b7abb6f17b957804d5 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org> >Date: Wed, 17 Jun 2009 12:31:49 +0200 >Subject: [PATCH] s3-net: Fix Bug #6328: allow multiple rights in "net sam rights grant". > >Guenther >--- > source3/utils/net_sam.c | 24 ++++++++++++++---------- > 1 files changed, 14 insertions(+), 10 deletions(-) > >diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c >index 0d8b6ff..e8ab412 100644 >--- a/source3/utils/net_sam.c >+++ b/source3/utils/net_sam.c >@@ -678,10 +678,11 @@ static int net_sam_rights_grant(struct net_context *c, int argc, > enum lsa_SidType type; > const char *dom, *name; > SE_PRIV mask; >+ int i; > >- if (argc != 2 || c->display_usage) { >+ if (argc < 2 || c->display_usage) { > d_fprintf(stderr, "usage: net sam rights grant <name> " >- "<right>\n"); >+ "<right> ...\n"); > return -1; > } > >@@ -691,17 +692,20 @@ static int net_sam_rights_grant(struct net_context *c, int argc, > return -1; > } > >- if (!se_priv_from_name(argv[1], &mask)) { >- d_fprintf(stderr, "%s unknown\n", argv[1]); >- return -1; >- } >+ for (i=1; i < argc; i++) { >+ if (!se_priv_from_name(argv[i], &mask)) { >+ d_fprintf(stderr, "%s unknown\n", argv[i]); >+ return -1; >+ } > >- if (!grant_privilege(&sid, &mask)) { >- d_fprintf(stderr, "Could not grant privilege\n"); >- return -1; >+ if (!grant_privilege(&sid, &mask)) { >+ d_fprintf(stderr, "Could not grant privilege\n"); >+ return -1; >+ } >+ >+ d_printf("Granted %s to %s\\%s\n", argv[i], dom, name); > } > >- d_printf("Granted %s to %s\\%s\n", argv[1], dom, name); > return 0; > } > >-- >1.6.2.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6328
:
4297
|
4298
|
4299
|
4307