cifs.upcall: remove getpwuid() dependency
authorEnzo Matsumiya <ematsumiya@suse.de>
Mon, 15 Jun 2026 17:25:22 +0000 (14:25 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 15 Jun 2026 22:50:07 +0000 (17:50 -0500)
commit972c5b5ff95e3e812bc8daa72d0383654ab0dba7
treee775c9cb173216352dc41c11fe07ae1efe379d8a
parent3487c54cd16b0b4ec3e70fe5264a1a381da9a7d2
cifs.upcall: remove getpwuid() dependency

This patch removes getpwuid() and resort to getting UID/GID from
   /proc/pid/status

Changes:
- add get_uidgid() helper
- drop supplementary groups (i.e. move setgroups(0, NULL)) before even
  decoding spnego key -- those are never needed in any case

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Reported-by: Shaomin Chen <eeesssooo020@gmail.com>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Acked-by: Pavel Shilovskiy <pshilovskiy@microsoft.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
cifs.upcall.c