trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: February 2014

Re: [trinity-devel] TDE running on systemd will require code changes proper session tracking?

From: "David C. Rankin" <drankinatty@...>
Date: Mon, 03 Feb 2014 18:01:26 -0600
On 02/03/2014 05:37 PM, David C. Rankin wrote:
> On 02/03/2014 04:41 PM, Slávek Banko wrote:
>> On Monday 03 of February 2014 23:32:02 David C. Rankin wrote:
>>> On 02/03/2014 04:15 PM, Slávek Banko wrote:
>>>> Now I read it again and if I understand it correctly, is that about
>>>> correct setting PAM => no need to change the source code of TDM?
>>>
>>> Yes -- there may be minor changes, but I believe the key is #3 and making
>>> sure the pam stack has the needed information including pam_systemd. The
>>> coding should be negligible. We just have to figure out how to tell if the
>>> pam stack is set properly in TDE/TDM. How in the heck do you do that?
>>>
>>> The environment settings are what was suggested in #2 and #4 on the
>>> http://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/
>>> page.
>>
>> Aha, so #1 is a little different :)
>>
>> For #1: WITH_CONSOLE_KIT is defined in dm.h => is always set. However, if 
>> ConsoleKit is not available on your system, it should not be a problem. 
>> Session will not be registered under the ConsoleKit and XDG_SESSION_COOKIE 
>> will not be set => no need to change source code TDM.
>>
>> If I understand correctly, #2 can be set in PAM configuration => no need to 
>> change source code TDM. And #4 is optional => no need to change source code 
>> TDM.
>>
>> Slavek
>>
> 
> I see what you are saying, but I'm a bit concerned that all the preprocessor
> directives may be causing problems.
> 
> For example, since WITH_CONSOLE_KIT is aways set, then what if
> (ck_session_cookie != NULL), then the XDG_SESSION_COOKIE is still set. Won't
> that screw up the pure systemd session tracking?
> 
> For #2 how in the heck to we set that? I don't see any options to register the
> greeter session via the PAM session stack or how to make sure the PAM session
> modules include pam_systemd?? It seems simple, but how/where are these things
> set? Are these additional pam_misc_setenv() or pam_setenv() calls that are
> needed are is there another way to set these? What does it mean "make sure the
> PAM session modules include pam_systemd"?
> 
> #3 is a reminder to make sure we did #2 correctly.... and then to do it AGAIN
> for the "logged in user". What?
> 
> #4 that is optional, but I don't see the harm in adding the pam_misc_setenv()
> calls to make sure pam has "seat0" and vt"7" -- or at least we need a way to
> confirm that it does. The running process information show vt7 is set correctly,
> but what is "seat0" and how to check?
> 
> /opt/trinity/bin/tdm
>  \_ /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-LI4Qla
>  \_ -:0
>      \_ /bin/sh /opt/trinity/bin/starttde
>          \_ /opt/trinity/bin/tdeinit_phase1
>              \_ kwrapper ksmserver --windowmanager twin
> 
> 
> I need more aspirin...
> 
> 
> 

Whether it is config or code, I need to find a solution. Just to open a
connection to my server and check dm.h in tdebase/tdm, I'm left with 9 open sftp
connections:

[tdeinit] tdeinit Running...
 \_ tdelauncher [tdeinit] --new-startup
 \_ twin [tdeinit] -session 10d7cdd8c9000139108311200000009720000_1391
 \_ konqueror [tdeinit] -session 10d7cdd8c9000139137984400000009830033
 \_ konqueror [tdeinit] -session 10d7cdd8c9000139144380300000007290014
 \_ konsole [tdeinit]
 |   \_ /bin/bash
 |   |   \_ su
 |   |       \_ bash
 |   \_ /bin/bash
 |       \_ ps axf
 |       \_ cut -c28-
 \_ tdeio_file [tdeinit] file /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s
 \_ tdeio_sftp [tdeinit] sftp /tmp/tdesocket-david/tdelauncherkQTzd6.s

If I check another file, I'm up to 18 connections, then 27, etc... You get it..

-- 
David C. Rankin, J.D.,P.E.