ANDROID: sdcardfs: Remove uninformative prints
authorDaniel Rosenberg <drosen@google.com>
Sat, 11 Mar 2017 02:58:25 +0000 (18:58 -0800)
committerStricted <info@stricted.net>
Thu, 11 Oct 2018 16:03:30 +0000 (18:03 +0200)
At best these prints do not provide useful information, and
at worst, some allow userspace to abuse the kernel log.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 36138424
Change-Id: I812c57cc6a22b37262935ab77f48f3af4c36827e

fs/sdcardfs/derived_perm.c
fs/sdcardfs/file.c
fs/sdcardfs/inode.c
fs/sdcardfs/lookup.c

index f2c7a2ac3ca1e6f5cec93dc22ee03343f9b31cc6..20d8ee89b65aa4b3e82295398c97f25d5254cb01 100644 (file)
@@ -428,7 +428,6 @@ int setup_obb_dentry(struct dentry *dentry, struct path *lower_path)
 
        if(!err) {
                /* the obbpath base has been found */
-               printk(KERN_INFO "sdcardfs: the sbi->obbpath is found\n");
                pathcpy(lower_path, &obbpath);
        } else {
                /* if the sbi->obbpath is not available, we can optionally
index a9c82b7eadad0df159bfd9b8e7ac6128c9ded096..28acc77852ae12c1012c9a04b6d42ffd31a06d26 100644 (file)
@@ -217,9 +217,6 @@ static int sdcardfs_open(struct inode *inode, struct file *file)
        }
 
        if(!check_caller_access_to_name(parent->d_inode, &dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                         "     dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                err = -EACCES;
                goto out_err;
        }
index 79b5c67c8e0110245f52759d3a5f6f204656baaf..42ffc0a6dd30c5ab63d5f73be509bfd8f02588f2 100644 (file)
@@ -68,9 +68,6 @@ static int sdcardfs_create(struct inode *dir, struct dentry *dentry,
        struct fs_struct *copied_fs;
 
        if(!check_caller_access_to_name(dir, &dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                "  dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                err = -EACCES;
                goto out_eacces;
        }
@@ -170,9 +167,6 @@ static int sdcardfs_unlink(struct inode *dir, struct dentry *dentry)
        const struct cred *saved_cred = NULL;
 
        if(!check_caller_access_to_name(dir, &dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                "  dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                err = -EACCES;
                goto out_eacces;
        }
@@ -280,9 +274,6 @@ static int sdcardfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
        struct qstr q_data = QSTR_LITERAL("data");
 
        if(!check_caller_access_to_name(dir, &dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                "  dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                err = -EACCES;
                goto out_eacces;
        }
@@ -392,9 +383,6 @@ static int sdcardfs_rmdir(struct inode *dir, struct dentry *dentry)
        const struct cred *saved_cred = NULL;
 
        if(!check_caller_access_to_name(dir, &dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                "  dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                err = -EACCES;
                goto out_eacces;
        }
@@ -481,9 +469,6 @@ static int sdcardfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
        if(!check_caller_access_to_name(old_dir, &old_dentry->d_name) ||
                !check_caller_access_to_name(new_dir, &new_dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                "  new_dentry: %s, task:%s\n",
-                                                __func__, new_dentry->d_name.name, current->comm);
                err = -EACCES;
                goto out_eacces;
        }
@@ -758,12 +743,8 @@ static int sdcardfs_setattr(struct vfsmount *mnt, struct dentry *dentry, struct
        if (!err) {
                /* check the Android group ID */
                parent = dget_parent(dentry);
-               if(!check_caller_access_to_name(parent->d_inode, &dentry->d_name)) {
-                       printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                        "  dentry: %s, task:%s\n",
-                                                        __func__, dentry->d_name.name, current->comm);
+               if(!check_caller_access_to_name(parent->d_inode, &dentry->d_name))
                        err = -EACCES;
-               }
                dput(parent);
        }
 
@@ -875,9 +856,6 @@ static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
 
        parent = dget_parent(dentry);
        if(!check_caller_access_to_name(parent->d_inode, &dentry->d_name)) {
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                                                "  dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                dput(parent);
                return -EACCES;
        }
index e1930d66882ed9708540883caca1fb10934aef17..c1a11c16fceee303fbc3e6522803f07c2b51e2ef 100644 (file)
@@ -395,9 +395,6 @@ struct dentry *sdcardfs_lookup(struct inode *dir, struct dentry *dentry,
 
        if(!check_caller_access_to_name(parent->d_inode, &dentry->d_name)) {
                ret = ERR_PTR(-EACCES);
-               printk(KERN_INFO "%s: need to check the caller's gid in packages.list\n"
-                         "     dentry: %s, task:%s\n",
-                                                __func__, dentry->d_name.name, current->comm);
                goto out_err;
         }