This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=f70ebb8c1d67d70222768b34ce7568b78fe191de The branch, master has been updated via f70ebb8c1d67d70222768b34ce7568b78fe191de (commit) from 1e9173dfbe7a22b8073fe2a5f6559612d24f67e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f70ebb8c1d67d70222768b34ce7568b78fe191de Author: Sergey Poznyakoff <g...@gnu.org.ua> Date: Mon Oct 24 11:38:42 2011 +0300 Simplify mu_file_safety_check call. * include/mailutils/util.h (mu_file_safety_check): Change type of the 3rd argument to uid_t. * libmailutils/base/filesafety.c: Likewise. All uses updated. ----------------------------------------------------------------------- Summary of changes: include/mailutils/util.h | 4 +--- libmailutils/base/filesafety.c | 6 ++---- libmu_auth/tls.c | 6 +++--- maidag/forward.c | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/mailutils/util.h b/include/mailutils/util.h index a1d4159..fcc11ac 100644 --- a/include/mailutils/util.h +++ b/include/mailutils/util.h @@ -220,10 +220,8 @@ int mu_onexit (mu_onexit_t func, void *data); MU_FILE_SAFETY_DIR_IWOTH ) -struct mu_auth_data; - int mu_file_safety_check (const char *filename, int mode, - struct mu_auth_data *auth, + uid_t uid, mu_list_t idlist); int mu_file_safety_name_to_code (const char *name, int *pcode); int mu_file_safety_name_to_error (const char *name, int *pcode); diff --git a/libmailutils/base/filesafety.c b/libmailutils/base/filesafety.c index 5bf2820..6de1e9a 100644 --- a/libmailutils/base/filesafety.c +++ b/libmailutils/base/filesafety.c @@ -191,7 +191,7 @@ mu_file_safety_name_to_error (const char *name, int *pcode) int mu_file_safety_check (const char *filename, int mode, - struct mu_auth_data *auth, + uid_t uid, mu_list_t idlist) { struct file_check_buffer buf; @@ -209,9 +209,7 @@ mu_file_safety_check (const char *filename, int mode, return MU_ERR_EXISTS; } - if ((mode & MU_FILE_SAFETY_OWNER_MISMATCH) && - auth && - auth->uid != buf.filst.st_uid) + if ((mode & MU_FILE_SAFETY_OWNER_MISMATCH) && uid != buf.filst.st_uid) return MU_ERR_PERM_OWNER_MISMATCH; for (pck = file_safety_check_tab; pck->flag; pck++) diff --git a/libmu_auth/tls.c b/libmu_auth/tls.c index d140cb7..b225921 100644 --- a/libmu_auth/tls.c +++ b/libmu_auth/tls.c @@ -74,7 +74,7 @@ mu_check_tls_environment (void) { int rc = mu_file_safety_check (mu_tls_module_config.ssl_cert, mu_tls_module_config.ssl_cert_safety_checks, - NULL, NULL); + -1, NULL); if (rc) { mu_error ("%s: %s", mu_tls_module_config.ssl_cert, @@ -83,7 +83,7 @@ mu_check_tls_environment (void) } rc = mu_file_safety_check (mu_tls_module_config.ssl_key, mu_tls_module_config.ssl_key_safety_checks, - NULL, NULL); + -1, NULL); if (rc) { mu_error ("%s: %s", mu_tls_module_config.ssl_key, @@ -93,7 +93,7 @@ mu_check_tls_environment (void) rc = mu_file_safety_check (mu_tls_module_config.ssl_cafile, mu_tls_module_config.ssl_cafile_safety_checks, - NULL, NULL); + -1, NULL); if (rc) { mu_error ("%s: %s", mu_tls_module_config.ssl_cafile, diff --git a/maidag/forward.c b/maidag/forward.c index a1b8697..5dfdc41 100644 --- a/maidag/forward.c +++ b/maidag/forward.c @@ -213,7 +213,7 @@ maidag_forward (mu_message_t msg, struct mu_auth_data *auth, char *fwfile) mu_list_create (&idlist); rc = mu_file_safety_check (filename, forward_file_checks, - auth, idlist); + auth->uid, idlist); if (rc == 0) result = process_forward (msg, filename, auth->name); else if (rc == MU_ERR_EXISTS) hooks/post-receive -- GNU Mailutils _______________________________________________ Commit-mailutils mailing list Commit-mailutils@gnu.org https://lists.gnu.org/mailman/listinfo/commit-mailutils