After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658451 - gnome-shell-based greeter session can't work with --disable-split-authentication
gnome-shell-based greeter session can't work with --disable-split-authentication
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-07 11:51 UTC by Vincent Untz
Modified: 2011-10-07 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
daemon: add better unified authentication compatibility (10.01 KB, patch)
2011-09-19 22:30 UTC, Ray Strode [halfline]
committed Details | Review
daemon: fix the legacy auth compatibility layer (2.93 KB, patch)
2011-09-26 15:50 UTC, Ray Strode [halfline]
committed Details | Review
daemon: additional fix for legacy auth compatibility layer (1.26 KB, patch)
2011-10-07 11:13 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2011-09-07 11:51:53 UTC
The gnome-shell-based greeter session is using the gdm-password PAM service, but if gdm is built with --disable-split-authentication, this gdm-password service is not installed.

I'm not sure what's best here; either the gnome-shell stuff should look if gdm-password does exist, or maybe we can really simply drop --disable-split-authentication? Unfortunately, the split authentication stuff needs work at the the distro level (I know I can't push it in openSUSE right now as it needs discussion about the pam configuration)
Comment 1 Vincent Untz 2011-09-07 11:52:16 UTC
FWIW, in the meantime, in openSUSE, I'm just linking /etc/pam.d/gdm-password to /etc/pam.d/gdm
Comment 2 Ray Strode [halfline] 2011-09-07 16:22:44 UTC
i guess if we build with --disable-split-authentication we should force the session to gdm-fallback.

what do you think?
Comment 3 Brian Cameron 2011-09-07 17:04:35 UTC
Isn't the issue here really that when you use split authentication it changes the PAM service names it uses?  It is kind of ugly to make GDM use different PAM service names based on what version of GDM you are using.  This is bound to mess up how sysadmins may have configured PAM.  

Really, the PAM service name used by GDM should be configurable.  Ideally it should be configurable in a per-display manner.  This way if a user wants to setup one display with a card reader and another with a fingerprint reader on a second display, you could just configure this with PAM.

So, it might be possible to fix this bug by just adding an interface so that GDM acquires the PAM service name via something like a per-display Init/PreSession/PostSession script.  Then it should be easy to configure the gnome-shell based greeter session to use the right service name when --disable-split-authentication is used, or in other situations where the sysadmin may want to use a specific PAM stack.
Comment 4 Ray Strode [halfline] 2011-09-07 17:53:09 UTC
no, they're different service names because they serve different functions.  They aren't strictly interchangeable and making the name configurable doesn't make sense since we ship them with GDM.
Comment 5 Vincent Untz 2011-09-08 07:49:04 UTC
Ray: it looks to me that the gnome-shell greeter can work fine without the split authentication. This probably means that we can't support the "swipe finger" patch that is going to land soon, though.

Would it be acceptable to have a gdm_greeter_use_split_authentication() API in libgdmgreeter, so that greeter implementations would know what to do? In the case of gnome-shell, that would mostly be "use gdm PAM service, and do not start the fingerprint stuff".
Comment 6 Ray Strode [halfline] 2011-09-08 14:43:18 UTC
Well, my hope was just to have --disable-split-authentication as a short term transitional thing to make life a little easier for distributions.

I was hoping to phase it out with the new greeter and drop it in 3.4 or so.  I can understand your viewpoint though.  You want the new greeter and things aren't there yet on the distro side to add split authentication support.  I don't want to leave you high and dry.

Hmm.  Maybe rather than codifying it in the API we could do a short term hack, like automatically alias gdm-password to gdm in the daemon or library code #ifndef SPLIT_AUTHENTICATION.

Then again, if we add the api we can always drop it later I guess since there aren't any api stability guarantees here...
Comment 7 Ray Strode [halfline] 2011-09-19 22:27:48 UTC
Okay, I've added some compatability name translation to the greeter server.
Comment 8 Ray Strode [halfline] 2011-09-19 22:30:48 UTC
Created attachment 197006 [details] [review]
daemon: add better unified authentication compatibility

The daemon and fallback greeter support --disable-split-authentication,
but the new shiny greeter doesn't.  This posed a problem for
distributions that want to use the new shiny greeter (in an albeit
degraded mode) but don't yet have support at the system level for
split authentication.

This commit adds a small amount of goo to make the split authentication
pam service names translate to the unified pam service name and
thus give the shell greeter a level of compatibility with
--disable-split-authentication.
Comment 9 Vincent Untz 2011-09-25 23:52:34 UTC
Ray, I had to revert this patch in openSUSE as now there's no password entry appearing.

I'll look for more details as to why this happens tomorrow.
Comment 10 Ray Strode [halfline] 2011-09-26 14:41:44 UTC
Okay, i'll investigate as well.
Comment 11 Ray Strode [halfline] 2011-09-26 15:50:23 UTC
Created attachment 197491 [details] [review]
daemon: fix the legacy auth compatibility layer

In commit f91f017071ffa5f5999e6c2e2c0929e290482932 I
introduced a translation layer that keeps compatibility
for distros who build with --disable-split-authentication.

The commit was somewhat faulty, though.  I made some last
minute clean ups to the patch before committing that I didn't
fully test.  Those cleanups resulted in the pam service name
getting improperly translated and broke the compatibility layer
the commit introduced.
Comment 12 Ray Strode [halfline] 2011-09-26 17:15:53 UTC
if you want me to freeze break for this let me know and i'll try to push it through.
Comment 13 Ray Strode [halfline] 2011-10-05 17:56:04 UTC
Were you ever able to give this patch a try Vincent ?
Comment 14 Vincent Untz 2011-10-05 18:51:49 UTC
(In reply to comment #13)
> Were you ever able to give this patch a try Vincent ?

Yes, and it works. See https://mail.gnome.org/archives/release-team/2011-September/msg00382.html :-)
Comment 15 Ray Strode [halfline] 2011-10-05 19:52:55 UTC
hah, i guess i need to be better about following threads that I start.
Comment 16 Ray Strode [halfline] 2011-10-05 19:54:42 UTC
Attachment 197491 [details] pushed as 1d7f466 - daemon: fix the legacy auth compatibility layer
Comment 17 Vincent Untz 2011-10-07 11:12:47 UTC
Doh, I apparently only tested the fix with the gnome-shell greeter, not with the old greeter. There I found another issue. Will attach a patch.

Sorry for that.
Comment 18 Vincent Untz 2011-10-07 11:13:01 UTC
Created attachment 198520 [details] [review]
daemon: additional fix for legacy auth compatibility layer

g_str_has_prefix() was misused.
Comment 19 Ray Strode [halfline] 2011-10-07 13:50:40 UTC
Comment on attachment 198520 [details] [review]
daemon: additional fix for legacy auth compatibility layer

gah, I suck. thanks.