On Thu, Sep 12, 2013 at 07:10:38PM +0200, Jakub Hrozek wrote:
> On Wed, Sep 11, 2013 at 05:47:31PM -0400, Simo Sorce wrote:
> > On Wed, 2013-09-11 at 19:19 +0200, Jakub Hrozek wrote:
> > > On Wed, Sep 11, 2013 at 10:26:41AM -0400, Simo Sorce wrote:
> > > > This patch was meant to remove the trolling of /proc for uids but I
> > > > haven't got there yet.
> > > > I meant to use utmp as a fallback but I realized utmp does not deal with
> > > > uid numbers rather usernames, and I need to think if it makes sense to
> > > > go that way as it may be hairy when we use subdomains as now I need to
> > > > know what kind of user name was used (fully qualified or not etcc.).
> > > >
> > > > So for now I left the old code as a fallback in case systemd is not
> > > > available or fails unexpectedly.
> > > >
> > > > Ticket: #2084
> > > >
> > > > Simo.
> > > > +#ifdef HAVE_SYSTEMD_LOGIN
> > > > + ret = sd_uid_get_sessions(uid, 0, NULL);
> > > > + if (ret > 0) {
> > > > + *result = true;
> > > > + }
> > > > + if (ret == 0) {
> > > > + *result = false;
> > > > + }
> > > > + if (ret >= 0) {
> > > > + return EOK;
> > > > + }
> > > > + DEBUG(0, ("systemd-login gave error %d: %s\n",
> > > > + -ret, strerror(-ret)));
> > > > + /* fall back to the old method */
> > >
> > > Please use SSSDBG here.
> >
> > attached.
> >
> > > Otherwise the code looks OK. Can you also open a
> > > ticket to to document this change in behaviour either in man page or at
> > > the very least the release notes?
> >
> > I already have a ticket for this change, so I added a release note in
> > that appropriate field there.
> >
> > Simo.
>
> That's fine, thank you.
>
> ACK
Actually, I think we also need to pull in systemd-devel. See the
attached patch, can I squash it in?
>From 40d5ce02fc1da1888e12d798123740c327c3ea13 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <[email protected]>
Date: Fri, 13 Sep 2013 17:13:02 +0200
Subject: [PATCH] Require systemd with modern distributions
---
contrib/sssd.spec.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index
3b6c2596fe363b275ef60ea67c2b40a143704bd2..fe002b6faa652fcdc965f3f97921907a628556aa
100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -125,6 +125,9 @@ BuildRequires: libnl3-devel
%else
BuildRequires: libnl-devel
%endif
+%if (0%{?use_systemd} == 1)
+BuildRequires: systemd-devel
+%endif
# RHEL 5 is too old to support samba4 and the PAC responder
%if !0%{?is_rhel5}
--
1.8.3.1
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel