Bug 12996 - [PATCH] Use seuser for SELinux login
Summary: [PATCH] Use seuser for SELinux login
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.33.x
Hardware: All Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-09 16:02 UTC by Po-Chun Chang
Modified: 2020-06-09 16:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
proposed patch (1.67 KB, patch)
2020-06-09 16:02 UTC, Po-Chun Chang
Details

Note You need to log in before you can comment on or make changes to this bug.
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