apparmor: allow profiles to provide info to disconnected paths
[sfrench/cifs-2.6.git] / security / apparmor / file.c
index 750564c3ab7116e13b46693e6002e87bf6d90e7d..83d43ac72134a70be2b178e89f8ea38fea4031a4 100644 (file)
@@ -285,7 +285,8 @@ int aa_path_perm(const char *op, struct aa_profile *profile,
        int error;
 
        flags |= profile->path_flags | (S_ISDIR(cond->mode) ? PATH_IS_DIR : 0);
-       error = aa_path_name(path, flags, &buffer, &name, &info);
+       error = aa_path_name(path, flags, &buffer, &name, &info,
+                            profile->disconnected);
        if (error) {
                if (error == -ENOENT && is_deleted(path->dentry)) {
                        /* Access to open files that are deleted are
@@ -366,13 +367,13 @@ int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
 
        /* buffer freed below, lname is pointer in buffer */
        error = aa_path_name(&link, profile->path_flags, &buffer, &lname,
-                            &info);
+                            &info, profile->disconnected);
        if (error)
                goto audit;
 
        /* buffer2 freed below, tname is pointer in buffer2 */
        error = aa_path_name(&target, profile->path_flags, &buffer2, &tname,
-                            &info);
+                            &info, profile->disconnected);
        if (error)
                goto audit;