Re: [systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-15 Thread Lennart Poettering
On Mon, 05.05.14 20:33, dedede gfgfgf trtrtrtrtrtr (s.kabano...@mail.ru) wrote: > Hello. > > During my testing  of systemd pam sessions i discovered that session > processes are not deleted automatically when i specify > KillUserProcesses=yes in latest versions of systemd. Investigations > showe

Re: [systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-12 Thread David Herrmann
Hi On Mon, May 12, 2014 at 1:49 PM, Sergei Kabanov wrote: > Hello > But all children will have that descriptor open. So when parent process will > die logind will not be notified. And? That's intentional. If you want to close the session if the main process dies, use something like /bin/login do

Re: [systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-12 Thread Sergei Kabanov
Mon, 12 May 2014 13:41:03 +0200 от David Herrmann : >Hi > >On Mon, May 12, 2014 at 1:27 PM, dedede gfgfgf trtrtrtrtrtr >< s.kabano...@mail.ru > wrote: >> Hello Colin. >> I am speaking about descriptors in systemd pam module. Application >> which use pam can not control it. Because of: >>

Re: [systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-12 Thread David Herrmann
Hi On Mon, May 12, 2014 at 1:27 PM, dedede gfgfgf trtrtrtrtrtr wrote: > Hello Colin. > I am speaking about descriptors in systemd pam module. Application > which use pam can not control it. Because of: > session_fd = dup(session_fd); > > in pam-module.c we have now descriptor which does

Re: [systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-12 Thread dedede gfgfgf trtrtrtrtrtr
Fri, 09 May 2014 11:07:45 + от Colin Walters : > > >On Mon, May 5, 2014 at 6:48 AM, dedede gfgfgf trtrtrtrtrtr >< s.kabano...@mail.ru > wrote: >> Investigations showed that since in pam module we started to dup fifo >> descriptor problem appeared. Dup does not set O_CLOEXEC flag. So >> af

Re: [systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-09 Thread Colin Walters
On Mon, May 5, 2014 at 6:48 AM, dedede gfgfgf trtrtrtrtrtr wrote: Investigations showed that since in pam module we started to dup fifo descriptor problem appeared. Dup does not set O_CLOEXEC flag. So after fork/exec all children processes have that descriptor and when parent which open pam

[systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-05 Thread dedede gfgfgf trtrtrtrtrtr
Hello. During my testing  of systemd pam sessions i discovered that session processes are not deleted automatically when i specify KillUserProcesses=yes in latest versions of systemd. Investigations showed that since in pam_systemd.so we started to dup() fifo descriptor problem appeared. Dup do

[systemd-devel] systemd pam and O_CLOEXEC problem

2014-05-05 Thread dedede gfgfgf trtrtrtrtrtr
Hello. During my testing  of systemd pam sessions i discovered that pam session is not closed automatically when i specify KillUserProcesses=yes in latest versions. Investigations showed that since in pam module we started to dup fifo descriptor problem appeared. Dup does not set O_CLOEXEC flag.