[SSSD] [PATCH] support local users as member of remote ldap server
Lukas Slebodnik
lslebodn at redhat.com
Mon Mar 18 09:02:36 UTC 2013
On (15/03/13 21:45), Simo Sorce wrote:
>This works only for rfc2307 schema.
>
>Resolves https://fedorahosted.org/sssd/ticket/1020
>
>Simo.
>
>--
>Simo Sorce * Red Hat, Inc * New York
>From ab8786126f1467c7b889598961b75c40f8fdafa5 Mon Sep 17 00:00:00 2001
>From: Simo Sorce <simo at redhat.com>
>Date: Fri, 15 Mar 2013 15:27:31 -0400
>Subject: [PATCH] ldap: Fallback option for rfc2307 schema
>
>Add option to fallback to fetch local users if rfc2307is being used.
>This is useful for cases where people added local users as LDAP members
>and rely on these group memberships to be maintained on the local host.
>
>Disabled by default as it violates identity domain separation.
>
>Ticket:
>https://fedorahosted.org/sssd/ticket/1020
>---
> src/providers/ldap/sdap_async_users.c | 92 ++++++++++++++++++++++++++++++
git warning: 1 line adds whitespace errors.
new blank line at EOF.
>diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
>+ if (fallback) {
>+ ret = sdap_fallback_local_user(state, state->ctx->opts,
>+ name, uid, &usr_attrs);
warning: 'uid' may be used uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/ldap_id.c:229:11: note: 'uid' was declared here
I know that it is handled inside function sdap_fallback_local_user(),
But it seems that both arguments are required "const char *name, uid_t uid"
For me it would be clearer if there will be struct passwd *pwd instead
of two arguments. Second solution is to write documentation to this function
describing function parameters and suppress warning with initialization
uid = ~0
LS
More information about the sssd-devel
mailing list