The Samba-Bugzilla – Attachment 1053 Details for
Bug 2498
cacl_get() doesn't allow to only show the ACLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add all_nt_acls boolean and additional ACLs output without the ACL prefix.
libsmbclient-cacl_get-all-acls.diff (text/plain), 3.02 KB, created by
Lars Müller
on 2005-03-19 17:32:16 UTC
(
hide
)
Description:
Add all_nt_acls boolean and additional ACLs output without the ACL prefix.
Filename:
MIME Type:
Creator:
Lars Müller
Created:
2005-03-19 17:32:16 UTC
Size:
3.02 KB
patch
obsolete
>Author: Lars Mueller <lmuelle @ SuSE dot de> >Subject: Allow cacl_get() to show only the ACLs. >Bugzilla: bugzilla.Samba.org #2498 > >--- samba-3.0.12/source/libsmb/libsmbclient.c >+++ samba-3.0.12/source/libsmb/libsmbclient.c 2005-03-20 01:09:20 >@@ -3321,6 +3321,7 @@ > int n_used; > BOOL all; > BOOL all_nt; >+ BOOL all_nt_acls; > BOOL all_dos; > BOOL some_nt; > BOOL some_dos; >@@ -3338,6 +3339,7 @@ > > all = (StrnCaseCmp(name, "system.*", 8) == 0); > all_nt = (StrnCaseCmp(name, "system.nt_sec_desc.*", 20) == 0); >+ all_nt_acls = (StrnCaseCmp(name, "system.nt_sec_desc.acl*", 23) == 0); > all_dos = (StrnCaseCmp(name, "system.dos_attr.*", 17) == 0); > some_nt = (StrnCaseCmp(name, "system.nt_sec_desc.", 19) == 0); > some_dos = (StrnCaseCmp(name, "system.dos_attr.", 16) == 0); >@@ -3349,7 +3351,7 @@ > * If we are (possibly) talking to an NT or new system and some NT > * attributes have been requested... > */ >- if (ipc_cli && (all || some_nt)) { >+ if (ipc_cli && (all || some_nt || all_nt_acls)) { > /* Point to the portion after "system.nt_sec_desc." */ > name += 19; /* if (all) this will be invalid but unused */ > >@@ -3542,7 +3544,30 @@ > ace->flags, > ace->info.mask); > } >- } >+ } else if (all_nt_acls) { >+ if (determine_size) { >+ p = talloc_asprintf(ctx, >+ "%s%s:%d/%d/0x%08x", >+ i ? "," : "", >+ sidstr, >+ ace->type, >+ ace->flags, >+ ace->info.mask); >+ if (!p) { >+ errno = ENOMEM; >+ return -1; >+ } >+ n = strlen(p); >+ } else { >+ n = snprintf(buf, bufsize, >+ "%s%s:%d/%d/0x%08x", >+ i ? "," : "", >+ sidstr, >+ ace->type, >+ ace->flags, >+ ace->info.mask); >+ } >+ } > if (n > bufsize) { > errno = ERANGE; > return -1;
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 2498
: 1053