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. 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?
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to