libselinux bug or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



when I use pam system to program, I invoke
pam_chauthtok function to change passwd, If I put this piece of code in
the main thread of a process, then everything is ok, but if i put the
code into a child thread, then it will return failed status.

when i trace the code, I found the pam system use selinux, the pam
system will invoke setfscreatecon() function. the implemention of
setfscreatecon() use below code to change fscreate stat:

fd = open("/proc/self/attr/fscreate", O_RDWR);

but, if the thread invode setfscreatecon() is a child thread in a
process, then, the /proc/self will point the main thread of the process,
not the child thread's own proc subdir. then the following code will fail.

can some find the same problem?

--
fedora-selinux-list mailing list
fedora-selinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-selinux-list

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux