[PATCH] Extend cifs acl utilities to handle SACLs

Aurélien Aptel aaptel at suse.com
Fri Dec 11 08:29:06 UTC 2020


Boris Protopopov via samba-technical <samba-technical at lists.samba.org>
writes:

> Fixed error cases for insufficient privileges, added
> attribute not supported error case for getcifsacl.
>
> Signed-off-by: Boris Protopopov <pboris at amazon.com>
> ---
>  getcifsacl.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/getcifsacl.c b/getcifsacl.c
> index 1c72e7c..c1974d3 100644
> --- a/getcifsacl.c
> +++ b/getcifsacl.c
> @@ -445,15 +445,26 @@ getxattr:
>  			free(attrval);
>  			bufsize += BUFSIZE;
>  			goto cifsacl;
> -		} else if ((errno == EPERM || errno == EACCES) &&
> -			   !(strcmp(attrname, ATTRNAME_NTSD_FULL))) {
> +		} else if (errno == EIO && !(strcmp(attrname, ATTRNAME_NTSD_FULL))) {
>  			/*
>  			 * attempt to fetch SACL in addition to owner and DACL via
>  			 * ATTRNAME_NTSD_FULL, fall back to owner/DACL via
>  			 * ATTRNAME_ACL if not allowed
> +			 * CIFS client maps STATUS_PRIVILEGE_NOT_HELD to EIO
>  			 */
> -			fprintf(stderr, "Insufficient permissions to fetch full descriptor for %s\n",
> +			fprintf(stderr, "WARGNING: Insufficient priviledges to fetch SACL for %s\n",

There's a typo WARGNING -> WARNING

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)




More information about the samba-technical mailing list