[10:51:02]  walters: hey [10:51:11]  so as part of the new PolicyKit release [10:51:51]  I'm doing something like this: http://people.freedesktop.org/~david/pkexec-1.png [10:51:59]  e.g. a 'sudo' command for polkit [10:52:23]  some background on that before I get to what I want to discuss here [10:52:32]  ***  shaunm has left chat #fedora-desktop (Ex-Chat). [10:52:32]  pkexec exists for two reasons [10:52:49]  1. users wants to do stuff like 'sudo gedit /etc/hosts' to work [10:53:05]  2. sometimes you need to run a privileged helper [10:53:08]  how will "Run As" get translated if it is not root? [10:53:29]  ie. is the phrase "Super User" hardcoded [10:53:37]  as an example of 2., consider Eclipse... I talked to the Eclipse guys about this.. they want to run oprofile as root... in a very controlled fashion.. so the idea is that they can drop a polkit XML file saying "use the action org.eclipse.profiler.run-oprofile' for this that specifies that running /usr/libexec/eclipse/run-oprofile' should use this action [10:54:58]  then they can grant authorizations for this action... including sane defaults like allowing people at the console to do stuff by default without a password [10:55:26]  so it's basically just fine-grained sudo without all the sudo configuration file nightmare things [10:55:41]  including using another polkit backend to decide if the caller is authorized [10:55:51]  e.g. directory server, roles, groups, all that crap [10:56:13]  jclinton: right now the phrase "Super User" is hardcoded [10:56:24]  can change that, just trying to illustrate the point [10:56:36]  walters: anyway, so I was looking at our old friend the session bus [10:56:44]  for case 1. [10:57:13]  e.g. suppose you start gedit as uid 0 using pkexec - should it be able to talk to the session bus already running as uid 500? [10:58:12]  so I tried doing that.. first of all, /etc/dbus-1/session.conf needs [10:58:20]  then things are actually sorta peachy [10:58:44]  e.g. 'pkexec xterm' and then 'gvfs-mount -li' (which talks to the gvfs volume monitors on the session bus) just works [10:59:05]  so that means the file chooser is kinda sane... you get to see the same mounts as in your normal session [10:59:16]  lots of other stuff break though... especially single-instance stuff [10:59:19]  gnome-terminal in particular [10:59:31]  walters: so I guess my question is what your thoughts on this are? [10:59:52]  it's a really hard question I think... there's no good answer, it's still on the level of "have to figure out this stuff"... [11:00:17]  (also, we want to patch the WM to display RED window decorations for windows from other uids) [11:00:58]  davidz: hmm [11:01:15]  davidz: do we really want to allow things like pkexec gedit ? [11:01:50]  there's actually a D-Bus bug about this... lemme find it [11:01:52]  sounds fishy. the whole point of policykit is to keep the toolkit code separate from the mechanism and unprivileged right? [11:02:08]  halfline: yeah, that's the long term goal [11:02:23]  including teaching GVfs about polkit [11:02:51]  so e.g. 'gedit /etc/hosts' works [11:02:51]  e.g. make GFile user a helper if it gets EPERM [11:02:53]  alexl_away blogged about that [11:02:59]  no-one has gotten around to this yet [11:03:14]  halfline: so pkexec is really just a geek-comfort for the interim [11:03:23]  and it's needed for stuff like 2. anyway [11:03:40]  e.g. we want to make it simple for e.g. Eclipse to run oprofile or whatever [11:04:14]  one thing to think about... [11:04:17]  sudo clears the environment [11:04:24]  sure, I do the same [11:04:25]  should pkexec ? [11:04:26]  of course [11:04:31]  right [11:04:34]  then how are you finding DBUS_SESSION_BUS_ADDRESS ? [11:04:47]    const gchar *environment_variables_to_save[] = { [11:04:47]      "DESKTOP_STARTUP_ID", [11:04:47]      "DISPLAY", [11:04:47]      "HOME", [11:04:47]      "LANG" [11:04:47]      "LANGUAGE", [11:04:49]      "LC_ALL", [11:04:51]      "LC_MESSAGES", [11:04:53]      "SHELL", [11:04:55]      "TERM", [11:04:57]      "XAUTHORITY", [11:04:59]  #if 0 [11:05:01]      "DBUS_SESSION_BUS_ADDRESS", [11:05:03]      "ORBIT_SOCKETDIR", [11:05:05]  #endif [11:05:07]      NULL [11:05:11]  halfline: I save some of the variables [11:05:21]  so e.g. LD_PRELOAD won't get through ;-) [11:05:35]  I mean, this is just standard stuff if you write secure programs [11:05:54]  hmm, but if you want pkexec generic-gui-app to keep working [11:05:56]  halfline: anyway, maybe the answer is simply that we don't set DISPLAY or DBUS_SESSION_BUS_ADDRESS at all in pkexec [11:05:58]  then that list isn't sufficient [11:06:05]  then of course 'pkexec gedit' won't work [11:06:15]  davidz: yea i think that's a better call [11:06:17]  halfline: maybe not (what do you think is missing?) [11:06:27]  KRB5_CCNAME was the one i thought of immediately [11:06:59]  halfline: but people are still going to want to run X11 apps as root for one reason or another.... so I don't think it's realistic to stop them doing so [11:07:37]  of course the defaults in the OS and the features we provide (e.g. make GVfs use a setuid helper so things like 'gedit /etc/hosts' work) should hopefully minimize the need for this [11:08:12]  well if people really want to be able to do it, they can always work around it [11:08:30]  pkexec env DISPLAY=$DISPLAY gedt [11:08:33]  *gedit [11:08:35]  or whatever [11:08:43]  I don't think putting roadblocks up and requiring them to work around it is going to help [11:08:46]  then people just get annoyed [11:08:56]  we should instead just make sure it's not needed [11:08:58]  well my thinking is... the real reason for this is the eclipse case right? [11:09:05]  and also do things like red decorations if they are [11:09:07]  and this other stuff is kind of like icing [11:09:09]  halfline: right [11:09:33]  well, any program where you need to do stuff as uid 0 and where you don't want to write a full-fledged system daemon using D-Bus to do this.... [11:09:47]  I mean, it's a bit overkill the way we have done some things already [11:09:54]  like gnome-system-monitor and kill/renice [11:09:57]  ***  shaunm (~shaunm@proxyserver.wolfram.com) has joined chat #fedora-desktop. [11:09:58]  ***  shaunm has been oped by Rupert. [11:10:05]  we have a dbus system service that is activated on demand [11:10:07]  to do this [11:10:09]  ***  jg has left chat #fedora-desktop (Read error: 145 (Connection timed out)). [11:10:19]  I expect we can replace that with 'pkexec kill 42' instead... [11:10:36]  so, just simpler all around [11:10:49]  i guess the key point here is, the only time this is useful is in cases where the thing after the pkexec is already small and self contained [11:10:57]  right [11:10:59]  and secure [11:11:01]  otherwise it's just like consolehelper all over again [11:11:09]  or gksudo or whatever [11:11:15]  yeah [11:11:24]  maybe I shouldn't care about doing 1. at all [11:11:30]  I mean, it's a rat hole [11:11:36]  yea [11:11:39]  that's what i'm thining [11:11:39]  people can just use sudo for now [11:11:56]  it was just icing anyway [11:12:14]  and people already have workflows to get that icing a different way [11:12:29]  it has security implications and functionality implications [11:12:38]  i mean things aren't going to generally work in that environment [11:13:02]  pkexec strikes me as much more useful for specific targeted, confined cases [11:13:15]  it just seems very convenient [11:13:15]  to add this [11:13:15]  plus you'll get the policy for free [11:13:15]  instead of admins having to somehow get 10,000 copies of /etc/sudoers on their machines [11:13:17]  (e.g. managing 10,000 machines) [11:13:19]  so I think it just might be worth it anyway [11:13:23]  right [11:13:25]  things work very poorly right now [11:13:52]  not only do things work poorly but i feel like time shouldn't be spent fixing them to work [11:13:52]  well, yeah [11:13:59]  but geek-comfort is pretty important too [11:14:16]  I mean, people are going to run X11 crap as root; they're not going to stop [11:14:20]  ajax: ping, hey dude. if I'm trying to debug a "why does my tv print out-of-range when i connect it to my laptop using a hdmi->dvi cable" type problem, have you got any pointers? the only mode it displays okay is 800x600@60Hz and that's no fun on a 26" screen [11:14:31]  davidz: i mean we alreayd disabled logging in as root from gdm [11:14:42]  halfline: that's a good start [11:14:44]  davidz: and gconf no longer works across a su [11:15:04]  halfline: actually if you just allow uid 0 to connect to the session bus it will [11:15:29]  we should at the very least paint the WM decorations in a scary red color [11:15:32]  davidz: there's dragons there though... [11:15:35]  if a X client is uid 0 [11:15:41]  davidz: what if a root app ends up activating gconfd? [11:15:48]  halfline: that's more because of how gconf works [11:16:04]  right my point is gconf isn't designed to be run that way [11:16:05]  halfline: a question is whether future software architectures allow this kind of thing [11:16:10]  I think, maybe they should [11:16:13]  I don't really know [11:16:21]  ajax: relevant xorg.0.log snippet here: http://fpaste.org/paste/12026 [11:16:26]  but you were saying this is for a near term geek convenience [11:16:33]  I mean, it's all good that we say "oh noz, don't do that" but it won't stop customers and users from filing bugs [11:16:38]  and the long term plan is to keep ui code unprivileged [11:16:45]  and only mechanism privileged [11:17:02]  so maybe I don't do 1. initially [11:17:11]  but I think it's worth thinking about this [11:17:15]  because it's not going away [11:17:17]  sure [11:17:26]  the nsa has some metacity patches i think btw [11:17:31]  also related is the whole "X clients from different hosts" [11:17:34]  for showing things running under different contexts differently [11:18:55]  hughsie: weeird, there's not even any funny interlacing business going on there [11:19:13]  also, a 1050p tv?  who decided that was a good idea. [11:19:18]  halfline: maybe another answer to "want to run X11 apps as other uid" is to start up a whole new session including a X server - and just run it rootless on top of your current session - maybe bridge the session buses somehow [11:19:44]  but then you have other problems as well [11:19:46]  ajax: where do i look to help debug this? got any pointers? [11:19:51]  so, yeah, hard problem [11:19:57]  hughsie: heh, it claims to be LG. [11:20:03]  * davidz decides not to work on that problem for now [11:20:09]  * davidz disables support for use case 1 [11:20:19]  ajax: heh, probably an lg panel with sony plastic... [11:20:43]  well, "Goldstar", but we all know who that is. [11:20:43]  my other monitor is an lg [11:21:08]  and i removed that dvi and plugged in the tv [11:21:10]  you sneaky person you! [11:21:35]  i'm guessing it's thinking the new panel is the old monitor [11:21:57]  davidz: LG == Lucky Goldstar, yeah [11:22:12]  yup, the same resolutions are listed for my monitor [11:22:27]  so the new panel capabilities are not being probed... [11:22:29]  kms [11:22:43]  latest f11 with updates [11:23:07]  how do i test if i'm getting unplug and plug events/ [11:23:28]  we don't actually respond to that automagically yet.  on the list. [11:23:38]  but, running 'xrandr -q' should refresh the mode list. [11:23:53]  if it doesn't then something's getting cached in the kernel somewhere and i get angry [11:25:20]  lovely [11:25:36]  i've got a feeling a reboot might fix this, but i don't think i should have to... :-) [11:25:42]  quite! [11:26:01]  i2c-adapter i2c-2: unable to read EDID block. [11:26:01]  i915 0000:00:02.0: DVI-D-1: no EDID data [11:26:36]  on the motherboard, is this an hdmi or a dvi port? [11:26:55]  the port works fine on my 21" LG monitor [11:27:31]  halfline: fwiw, https://bugs.freedesktop.org/show_bug.cgi?id=17970 got a lot of clueful comments [11:27:41]  but that's dvi->dvi, rather than dvi->hdmi if that matters [11:28:33]  well, the cable doesn't matter.  electrically they're the same.  but the transceiver on the mobo (or dock in this case) is different for true hdmi connectors, and there's been some bugs in that area recently. [11:29:05]  (actually, electrically hdmi is a superset, it has one more pin and a higher crossover frequency, but that doesn't matter here) [11:29:26]  yeah, shame.  was hoping that was it. [11:30:19]  davidz: oh yea that bug [11:31:58]  it doesn't get sent, it's something the host pulls.  if i had to guess, the dock DVI support is conflating "SDVO connected" with "DVI connected", and then trying to elide EDID fetches when there's not been a change in connection state. [11:32:03]  halfline: anyway, it's not a problem in Fedora - we don't have any remotely useful stuff that needs to run as uid 0 these days [11:32:11]  sdvo being the expansion bus that gets you to the DVI transceiver on the dock [11:32:28]  so, let's test that theory.  undock, xrandr -q, redock, xrandr -q. [11:32:40]  halfline: I just wish someone would clean up the livecd so we don't install any of the system-config-* programs (at least the ones using consolehelper)