Bug 12996

Summary: [PATCH] Use seuser for SELinux login
Product: Busybox Reporter: Po-Chun Chang <pochang0403>
Component: Standard ComplianceAssignee: unassigned
Status: NEW ---    
Severity: major CC: busybox-cvs
Priority: P5    
Version: 1.33.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: proposed patch

Description Po-Chun Chang 2020-06-09 16:02:49 UTC
Created attachment 8496 [details]
proposed patch

loginutils/login.c:
  initselinux() should use the selinux seuser for default context, not the
  Linux username as stated in the reference (see getseuserbyname):
    https://selinuxproject.org/page/LibselinuxAPISummary

  Example code: 
    https://github.com/SELinuxProject/selinux/blob/master/libselinux/utils/getseuser.c