Skip to content

Commit 12ebe14

Browse files
abbrasimo5
authored andcommitted
report file operation errors as warnings
The failures to change permissions and chown the ccache do not prevent us from continuing to use this ccache. Log messages are confusing to mod_auth_gssapi users as they leave an impression things are completely broken. Change log level to warning to avoid filling up logs with them on error log level. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Simo Sorce <simo@redhat.com>
1 parent df49b2a commit 12ebe14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/environ.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,29 +329,29 @@ static void mag_set_ccname_envvar(request_rec *req, struct mag_config *cfg,
329329
(finfo.protection != cfg->deleg_ccache_mode)) {
330330
status = apr_file_perms_set(path, cfg->deleg_ccache_mode);
331331
if (status != APR_SUCCESS)
332-
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, req,
332+
ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, req,
333333
"failed to set perms (%o) on file (%s)!",
334334
cfg->deleg_ccache_mode, path);
335335
}
336336
if ((cfg->deleg_ccache_uid != 0) &&
337337
(finfo.user != cfg->deleg_ccache_uid)) {
338338
status = lchown(path, cfg->deleg_ccache_uid, -1);
339339
if (status != 0)
340-
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, req,
340+
ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, req,
341341
"failed to set user (%u) on file (%s)!",
342342
cfg->deleg_ccache_uid, path);
343343
}
344344
if ((cfg->deleg_ccache_gid != 0) &&
345345
(finfo.group != cfg->deleg_ccache_gid)) {
346346
status = lchown(path, -1, cfg->deleg_ccache_gid);
347347
if (status != 0)
348-
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, req,
348+
ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, req,
349349
"failed to set group (%u) on file (%s)!",
350350
cfg->deleg_ccache_gid, path);
351351
}
352352
} else {
353353
/* set the file cache anyway, but warn */
354-
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, req,
354+
ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, req,
355355
"KRB5CCNAME file (%s) lookup failed!", path);
356356
}
357357

0 commit comments

Comments
 (0)