CIFS: Retrieve uid and gid from special sid if enabled
authorSteve French <smfrench@gmail.com>
Fri, 14 Oct 2016 00:06:23 +0000 (19:06 -0500)
committerSteve French <smfrench@gmail.com>
Fri, 14 Oct 2016 19:22:16 +0000 (14:22 -0500)
commit3514de3fd5fab518520e393152d3f4e3d0441d8d
tree7902a65b0d8b109513cd5e7b9bc279c231edee92
parent9593265531fa66177a0547e63abd99907ec0a687
CIFS: Retrieve uid and gid from special sid if enabled

New mount option "idsfromsid" indicates to cifs.ko that
it should try to retrieve the uid and gid owner fields
from special sids.  This patch adds the code to parse the owner
sids in the ACL to see if they match, and if so populate the
uid and/or gid from them.  This is faster than upcalling for
them and asking winbind, and is a fairly common case, and is
also helpful when cifs.upcall and idmapping is not configured.

Signed-off-by: Steve French <steve.french@primarydata.com>
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/cifsacl.c