summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5
diff options
context:
space:
mode:
authorPavel Reichl <reichl.pavel@gmail.com>2014-04-15 16:31:49 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-04-17 10:31:14 +0200
commit26ce47cc3e2003c30bae8206c3085f0814c9a842 (patch)
tree548008c98cf52b4d8482822c18872c34df6f5a20 /src/providers/krb5
parent9ac564a9155e546571a36a73ae1553f1708af469 (diff)
downloadsssd-26ce47cc3e2003c30bae8206c3085f0814c9a842.tar.gz
sssd-26ce47cc3e2003c30bae8206c3085f0814c9a842.tar.xz
sssd-26ce47cc3e2003c30bae8206c3085f0814c9a842.zip
KRB: do not check ccache directory for GID
Diffstat (limited to 'src/providers/krb5')
-rw-r--r--src/providers/krb5/krb5_utils.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c
index f921b0632..0734310ca 100644
--- a/src/providers/krb5/krb5_utils.c
+++ b/src/providers/krb5/krb5_utils.c
@@ -416,15 +416,12 @@ done:
return res;
}
-static errno_t check_parent_stat(struct stat *parent_stat,
- uid_t uid, gid_t gid)
+static errno_t check_parent_stat(struct stat *parent_stat, uid_t uid)
{
- if (!((parent_stat->st_uid == 0 && parent_stat->st_gid == 0) ||
- parent_stat->st_uid == uid)) {
+ if (parent_stat->st_uid != 0 && parent_stat->st_uid != uid) {
DEBUG(SSSDBG_CRIT_FAILURE,
"Private directory can only be created below a directory "
- "belonging to root or to [%"SPRIuid"][%"SPRIgid"].\n",
- uid, gid);
+ "belonging to root or to [%"SPRIuid"].\n", uid);
return EINVAL;
}
@@ -589,7 +586,7 @@ create_ccache_dir(const char *ccdirname, pcre *illegal_re,
goto done;
}
- ret = check_parent_stat(&parent_stat, uid, gid);
+ ret = check_parent_stat(&parent_stat, uid);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
"Check the ownership and permissions of krb5_ccachedir: [%s].\n",