/srv/irclogs.ubuntu.com/2010/08/10/#upstart.txt

goraxeion: I have updated my branch to meet your review comments00:30
ionGreat, thanks00:30
goraxedo you think this a feature thats likely to get merged?00:31
ionThere’s definitely demand for that, and it would be nice to have while full PAM support is still in TODO. The change isn’t invasive either. Ultimately it’s up to Keybuk, though.00:36
goraxecoll thanks00:37
goraxedoh00:37
goraxe*cool 00:37
ionThere are still some function calls in the “foo()” style instead of “foo ()”. Oh, and the first instance of JOB_PROCESS_ERROR_SETUID is probably a typo, it should be _USER i guess.00:37
goraxespace between function (parms)?00:37
ionYeah, that’s the coding style in Upstart.00:37
Keybukion: "for that" ?00:37
ionkeybuk: For setuid support in jobs. https://code.edge.launchpad.net/~goraxe/upstart/user_sid/+merge/3190500:38
Keybukrandomly quick comments00:39
Keybuk"user" should be "uid" (since it's set uid, not PAM user support)00:39
Keybukshould support "uid 1000" as well as "uid messagebus"00:39
Keybuksetgid? initgroups?00:39
goraxeuser -> uid sure can do, setgid yep, spotting uid \d vs \w ... may need some advice, initgroups guessing that sets up non primary group member ship?00:42
Keybukall group membership in fact00:43
Keybukif you just setuid() like that, it'll still be gid 000:43
Keybukwhich may have surprising consequences permissions-wise00:43
goraxeyep can see that 00:43
Keybukhmm, actually, can't remember whether initgroups sets the primary group or not ;)00:45
goraxeI will check the manpage for usage00:46
ionThe man page only seems to talk about the supplementary group list.00:46
goraxeta00:46
goraxe:-)00:46
Keybukyou may need to setgid (user->pw_gid) as well00:47
Keybukin which case, definitely add a "gid" support in too00:47
goraxeif gid not set use ->pw_gid ?00:47
goraxeshould uid and gid be looked up at parse time instead of job spawn time?00:50
Keybukexactly00:50
Keybukhmm00:50
Keybuklooking up user and group ids is complex00:50
Keybukat parse time is when init starts, you almost certainly don't have nsswitch by then ;-)00:51
KeybukLDAP, Kerberos, etc. won't be up00:51
Keybuk(no network, for a start!)00:51
Keybukone bright side of doing this in job_process is that it's also done in a child, so any issues just prevent spawning, rather than holding up or crapping up the init daemon00:51
Keybuksure you get no cacheing, but then setuid isn't really common enough to cache00:52
Keybukcertainly if any two services spawned *share* a uid (benefit to cacheing) they're probably doing it wrong from a security POV00:52
goraxemy use case for this is entirly for local user services, and we have a LDAP/kerberos env 00:53
goraxebasicly we have started using exec su <user> -c <command>  ... which i think is quite ugly ...00:54
Keybukyeah, su gives you a PAM session though00:54
Keybukwhich may be what you want00:54
goraxehmm ... you may have a point ... I think for our trivial cases we just want to spawn daemons at statup keep em running if they crash, and do some basic priv dropping00:56
goraxeie this would be a good start, but I agree would not cover all cases00:56
goraxehow much of the pam stuff have you got scoped out?00:56
Keybukthe PAM stuff is easy00:57
Keybukthinking about how a user of the same uid would restart a service - that's hard :)00:57
Keybukthe "uid"/"gid" stuff is just a property of a system service in this case, so just required someone to care enough to implement it00:57
KeybukI've no problem with applying it into the next 0.6 release once it's ready00:57
goraxecool, thanks00:58
goraxeon that note I really should call it a night01:00
sacardehi12:28
morgan__hello there, i was wondering if there is any list of integrated upstart signals such as "start on net-device-added" or "start on filesystem" available ? 18:41
=== Md_ is now known as Md
goraxeion, Keybuk: I have done some more work to change to uid & gid stanza 23:44
goraxeI'm having a bit of a problem with initgroups though 23:45
goraxeit seems to only work if the process is running as root, even chmod +s on the file did not give it enough perms23:49
goraxethe file being test_job_process23:49

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!