From: Arran Cudbard-Bell Date: Tue, 10 Jul 2018 21:39:37 +0000 (-0400) Subject: Print more info about failing permissions checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31476e9504e2b224ddd80ae972cadebcc406ed69;p=thirdparty%2Ffreeradius-server.git Print more info about failing permissions checks --- diff --git a/src/main/cf_file.c b/src/main/cf_file.c index d7e9b1657ef..8cd740c8890 100644 --- a/src/main/cf_file.c +++ b/src/main/cf_file.c @@ -542,27 +542,27 @@ bool cf_file_check(CONF_SECTION *cs, char const *filename, bool check_perms) if ((conf_check_gid != (gid_t)-1) && ((egid = getegid()) != conf_check_gid)) { if (setegid(conf_check_gid) < 0) { - ERROR("Failed setting effective group ID for file check"); + ERROR("Failed setting effective group ID (%i) for file check: %s", fr_syserror(errno)); goto error; } } if ((conf_check_uid != (uid_t)-1) && ((euid = geteuid()) != conf_check_uid)) { if (seteuid(conf_check_uid) < 0) { - ERROR("Failed setting effective user ID for file check"); + ERROR("Failed setting effective user ID (%i) for file check: %s", fr_syserror(errno)); goto error; } } fd = open(filename, O_RDONLY); if (conf_check_uid != euid) { if (seteuid(euid) < 0) { - ERROR("Failed restoring effective user ID after file check"); + ERROR("Failed restoring effective user ID (%i) after file check", fr_syserror(errno)); goto error; } } if (conf_check_gid != egid) { if (setegid(egid) < 0) { - ERROR("Failed restoring effective group ID after file check"); + ERROR("Failed restoring effective group ID (%i) after file check", fr_syserror(errno)); goto error; } } @@ -1842,7 +1842,7 @@ int cf_section_write(FILE *fp, CONF_SECTION *cs, int depth) * out the parsed condition, instead of the input text * * cf_data_find(cs, CF_DATA_TYPE_UNLANG, "if"); - */ + */ if (cs->name2) { fr_cond_t *c;