Skip to contentSkip to conversation

pam_selinux when selinux is disabled

DISCUSSION Luke Kenneth Casson Leighton 4 participants 5 messages Dec 28, 2004 – Dec 29, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

does anyone know what happens when selinux is disabled and pam_selinux is being used [by login, ssh, kdm, whatever]?

l.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 2 lines · Luke Kenneth Casson Leighton

does anyone know what happens when selinux is disabled and pam_selinux is being used [by login, ssh, kdm, whatever]?

I believe that pam_selinux checks is_selinux_enabled() and bails immediately with PAM_SUCCESS if SELinux is not enabled; check the current pam_selinux module in the recently opened Fedora Core public CVS tree (see http://cvs.fedora.redhat.com/core.shtml).

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 8 lines · Stephen Smalley
Quoted 2 lines · Luke Kenneth Casson Leighton

does anyone know what happens when selinux is disabled and pam_selinux is being used [by login, ssh, kdm, whatever]?

I believe that pam_selinux checks is_selinux_enabled() and bails immediately with PAM_SUCCESS if SELinux is not enabled; check the current pam_selinux module in the recently opened Fedora Core public CVS tree (see http://cvs.fedora.redhat.com/core.shtml).

BTW, sshd is no longer using pam_selinux; we had to go back to a direct patch due to changes in the upstream sshd.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw

Hi,

Quoted 2 lines · Stephen Smalley

BTW, sshd is no longer using pam_selinux; we had to go back to a direct patch due to changes in the upstream sshd.

I am not storing my username/password in standard /etc/passwd but in different files/DB.. so i have personalized getpwnam by editing /etc/nsswitch.conf

thats works fine.

when you define users in a policy .. it calls python getpwnam and adds user to selinux user db. So I guess even that is fine.

now .. the question is when login sets selinux context for a user which system call it makes to get user identification and which system call it uses to set the context.

If sshd is not relying on pam_selinux than .. is all this hard-coded in sshd ???

Please clarify it.
Jaspreet.

Signature · 4 lines
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#4 lore raw
Quoted 23 lines · Jaspreet Singh

Hi,

Quoted 4 lines · Stephen Smalley

BTW, sshd is no longer using pam_selinux; we had to go back to a direct patch due to changes in the upstream sshd.

I am not storing my username/password in standard /etc/passwd but in different files/DB.. so i have personalized getpwnam by editing /etc/nsswitch.conf

thats works fine.

when you define users in a policy .. it calls python getpwnam and adds user to selinux user db. So I guess even that is fine.

now .. the question is when login sets selinux context for a user which system call it makes to get user identification and which system call it uses to set the context.

Quoted 8 lines

If sshd is not relying on pam_selinux than .. is all this hard-coded in sshd ???

Please clarify it.
Jaspreet.

All code is using getpwnam type calls, so it should work fine.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.