summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-09-04 16:28:06 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-11 19:44:55 +0200
commitf2c346eaa486431ffa2a3adc05356159de834e2e (patch)
tree93b45f3b4bec2200b921be536baab59856bb0435 /src/providers
parentaf58b15fa7f20e33736d79c6a4b3becb568517ca (diff)
downloadsssd-f2c346eaa486431ffa2a3adc05356159de834e2e.tar.gz
sssd-f2c346eaa486431ffa2a3adc05356159de834e2e.tar.bz2
sssd-f2c346eaa486431ffa2a3adc05356159de834e2e.zip
Fix formating of variables with type: uid_t
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/krb5/krb5_become_user.c5
-rw-r--r--src/providers/krb5/krb5_utils.c4
-rw-r--r--src/providers/proxy/proxy_id.c11
3 files changed, 12 insertions, 8 deletions
diff --git a/src/providers/krb5/krb5_become_user.c b/src/providers/krb5/krb5_become_user.c
index 567cf237..d549d838 100644
--- a/src/providers/krb5/krb5_become_user.c
+++ b/src/providers/krb5/krb5_become_user.c
@@ -30,12 +30,13 @@ errno_t become_user(uid_t uid, gid_t gid)
uid_t cuid;
int ret;
- DEBUG(SSSDBG_FUNC_DATA, ("Trying to become user [%d][%d].\n", uid, gid));
+ DEBUG(SSSDBG_FUNC_DATA,
+ ("Trying to become user [%"SPRIuid"][%d].\n", uid, gid));
/* skip call if we already are the requested user */
cuid = geteuid();
if (uid == cuid) {
- DEBUG(SSSDBG_FUNC_DATA, ("Already user [%d].\n", uid));
+ DEBUG(SSSDBG_FUNC_DATA, ("Already user [%"SPRIuid"].\n", uid));
return EOK;
}
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c
index d0968735..9dd9882d 100644
--- a/src/providers/krb5/krb5_utils.c
+++ b/src/providers/krb5/krb5_utils.c
@@ -242,7 +242,7 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr,
"because uid is invalid.\n"));
goto done;
}
- result = talloc_asprintf_append(result, "%s%d", p,
+ result = talloc_asprintf_append(result, "%s%"SPRIuid, p,
kr->uid);
if (!file_mode) *private_path = true;
break;
@@ -386,7 +386,7 @@ static errno_t check_parent_stat(bool private_path, struct stat *parent_stat,
if (!((parent_stat->st_uid == 0 && parent_stat->st_gid == 0) ||
parent_stat->st_uid == uid)) {
DEBUG(1, ("Private directory can only be created below a "
- "directory belonging to root or to [%d][%d].\n",
+ "directory belonging to root or to [%"SPRIuid"][%d].\n",
uid, gid));
return EINVAL;
}
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index b5d63ecf..4ac1c8dc 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -22,6 +22,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
+#include "util/sss_format.h"
#include "util/strtonum.h"
#include "providers/proxy/proxy.h"
@@ -166,7 +169,7 @@ handle_getpw_result(enum nss_status status, struct passwd *pwd,
case NSS_STATUS_SUCCESS:
- DEBUG(SSSDBG_TRACE_FUNC, ("User found: (%s, %d, %d)\n",
+ DEBUG(SSSDBG_TRACE_FUNC, ("User found: (%s, %"SPRIuid", %d)\n",
pwd->pw_name, pwd->pw_uid, pwd->pw_gid));
/* uid=0 or gid=0 are invalid values */
@@ -314,7 +317,7 @@ static int get_pw_uid(TALLOC_CTX *mem_ctx,
bool del_user = false;
int ret;
- DEBUG(SSSDBG_TRACE_FUNC, ("Searching user by uid (%d)\n", uid));
+ DEBUG(SSSDBG_TRACE_FUNC, ("Searching user by uid (%"SPRIuid")\n", uid));
tmpctx = talloc_new(NULL);
if (!tmpctx) {
@@ -354,7 +357,7 @@ done:
talloc_zfree(tmpctx);
if (ret) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("proxy -> getpwuid_r failed for '%d' <%d>: %s\n",
+ ("proxy -> getpwuid_r failed for '%"SPRIuid"' <%d>: %s\n",
uid, ret, strerror(ret)));
}
return ret;
@@ -453,7 +456,7 @@ static int enum_users(TALLOC_CTX *mem_ctx,
case NSS_STATUS_SUCCESS:
- DEBUG(SSSDBG_TRACE_LIBS, ("User found (%s, %d, %d)\n",
+ DEBUG(SSSDBG_TRACE_LIBS, ("User found (%s, %"SPRIuid", %d)\n",
pwd->pw_name, pwd->pw_uid, pwd->pw_gid));
/* uid=0 or gid=0 are invalid values */