audit_log_{name,link_denied}: constify struct path
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 21 Nov 2016 01:36:51 +0000 (20:36 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 6 Dec 2016 00:00:38 +0000 (19:00 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/audit.h
kernel/audit.c
kernel/audit.h

index 9d4443f93db6b1568baa5bd1066b66cf6885484d..f51fca8d0b6f86f4229a3ff487c39c18ad1a92c4 100644 (file)
@@ -147,7 +147,7 @@ extern void             audit_log_d_path(struct audit_buffer *ab,
 extern void                audit_log_key(struct audit_buffer *ab,
                                          char *key);
 extern void                audit_log_link_denied(const char *operation,
-                                                 struct path *link);
+                                                 const struct path *link);
 extern void                audit_log_lost(const char *message);
 #ifdef CONFIG_SECURITY
 extern void                audit_log_secctx(struct audit_buffer *ab, u32 secid);
index f1ca11613379fa2950aa7e33e732d85462f1fb57..06008c422bd5f4e1c9112957ae4a8c337b5d7ff2 100644 (file)
@@ -1760,7 +1760,7 @@ void audit_copy_inode(struct audit_names *name, const struct dentry *dentry,
  * @call_panic: optional pointer to int that will be updated if secid fails
  */
 void audit_log_name(struct audit_context *context, struct audit_names *n,
-                   struct path *path, int record_num, int *call_panic)
+                   const struct path *path, int record_num, int *call_panic)
 {
        struct audit_buffer *ab;
        ab = audit_log_start(context, GFP_KERNEL, AUDIT_PATH);
@@ -1948,7 +1948,7 @@ EXPORT_SYMBOL(audit_log_task_info);
  * @operation: specific link operation
  * @link: the path that triggered the restriction
  */
-void audit_log_link_denied(const char *operation, struct path *link)
+void audit_log_link_denied(const char *operation, const struct path *link)
 {
        struct audit_buffer *ab;
        struct audit_names *name;
index 431444c3708bf4634568b9a8d83318de7c0fa22f..960d49c9db5e3c79b70171c6c9ca1f4d8acf58f2 100644 (file)
@@ -212,7 +212,7 @@ extern void audit_copy_inode(struct audit_names *name,
 extern void audit_log_cap(struct audit_buffer *ab, char *prefix,
                          kernel_cap_t *cap);
 extern void audit_log_name(struct audit_context *context,
-                          struct audit_names *n, struct path *path,
+                          struct audit_names *n, const struct path *path,
                           int record_num, int *call_panic);
 
 extern int audit_pid;