On (14/02/14 12:42), Pavel Březina wrote:
>
https://fedorahosted.org/sssd/ticket/2203
>From 48ede856df611eca2337b7715b018eae1c5b3b97 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina(a)redhat.com>
> Date: Fri, 14 Feb 2014 12:39:13 +0100
> Subject: [PATCH] sysdb: warn to syslog when removing object with same uid/gid
>
> Resolves:
>
https://fedorahosted.org/sssd/ticket/2203
> ---
> src/db/sysdb_ops.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
> index
3065be6444070a8d1fceddb323cff883434eacf4..57616209b76ccc43ff2776594a61c2be44ed06d7 100644
> --- a/src/db/sysdb_ops.c
> +++ b/src/db/sysdb_ops.c
> @@ -1795,6 +1795,9 @@ int sysdb_store_user(struct sss_domain_info *domain,
> DEBUG(SSSDBG_MINOR_FAILURE,
> "A user with the same UID [%llu] was removed from the "
> "cache\n", (unsigned long long) uid);
> + sss_log(SSS_LOG_WARNING, "A user with the same UID [%llu] was
"
> + "removed from the cache\n", (unsigned long long)
uid);
> +
> ret = sysdb_add_user(domain, name, uid, gid, gecos, homedir,
> shell, orig_dn, attrs, cache_timeout, now);
> }
> @@ -1951,6 +1954,9 @@ int sysdb_store_group(struct sss_domain_info *domain,
> DEBUG(SSSDBG_MINOR_FAILURE,
> "A group with the same GID [%llu] was removed from the
"
> "cache\n", (unsigned long long) gid);
> + sss_log(SSS_LOG_WARNING, "A group with the same GID [%llu] was
"
> + "removed from the cache\n", (unsigned long long)
gid);
Could you use macro SPRIuid instead of foramt string "%llu" and also remove
explicit casting. (also in unchanged DEBUG message)
Thank you
LS