Skip to content

Commit 52ef0c0

Browse files
author
Al Viro
committed
switch securityfs_create_file() to umode_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 910f4ec commit 52ef0c0

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎include/linux/security.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,7 +3010,7 @@ static inline void security_audit_rule_free(void *lsmrule)
30103010

30113011
#ifdef CONFIG_SECURITYFS
30123012

3013-
extern struct dentry *securityfs_create_file(const char *name, mode_t mode,
3013+
extern struct dentry *securityfs_create_file(const char *name, umode_t mode,
30143014
struct dentry *parent, void *data,
30153015
const struct file_operations *fops);
30163016
extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent);
@@ -3025,7 +3025,7 @@ static inline struct dentry *securityfs_create_dir(const char *name,
30253025
}
30263026

30273027
static inline struct dentry *securityfs_create_file(const char *name,
3028-
mode_t mode,
3028+
umode_t mode,
30293029
struct dentry *parent,
30303030
void *data,
30313031
const struct file_operations *fops)

‎security/apparmor/apparmorfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static void __init aafs_remove(const char *name)
165165
*
166166
* Used aafs_remove to remove entries created with this fn.
167167
*/
168-
static int __init aafs_create(const char *name, int mask,
168+
static int __init aafs_create(const char *name, umode_t mask,
169169
const struct file_operations *fops)
170170
{
171171
struct dentry *dentry;

‎security/inode.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static const struct file_operations default_file_ops = {
5656
.llseek = noop_llseek,
5757
};
5858

59-
static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)
59+
static struct inode *get_inode(struct super_block *sb, umode_t mode, dev_t dev)
6060
{
6161
struct inode *inode = new_inode(sb);
6262

@@ -85,7 +85,7 @@ static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)
8585

8686
/* SMP-safe */
8787
static int mknod(struct inode *dir, struct dentry *dentry,
88-
int mode, dev_t dev)
88+
umode_t mode, dev_t dev)
8989
{
9090
struct inode *inode;
9191
int error = -ENOMEM;
@@ -102,7 +102,7 @@ static int mknod(struct inode *dir, struct dentry *dentry,
102102
return error;
103103
}
104104

105-
static int mkdir(struct inode *dir, struct dentry *dentry, int mode)
105+
static int mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
106106
{
107107
int res;
108108

@@ -113,7 +113,7 @@ static int mkdir(struct inode *dir, struct dentry *dentry, int mode)
113113
return res;
114114
}
115115

116-
static int create(struct inode *dir, struct dentry *dentry, int mode)
116+
static int create(struct inode *dir, struct dentry *dentry, umode_t mode)
117117
{
118118
mode = (mode & S_IALLUGO) | S_IFREG;
119119
return mknod(dir, dentry, mode, 0);
@@ -145,7 +145,7 @@ static struct file_system_type fs_type = {
145145
.kill_sb = kill_litter_super,
146146
};
147147

148-
static int create_by_name(const char *name, mode_t mode,
148+
static int create_by_name(const char *name, umode_t mode,
149149
struct dentry *parent,
150150
struct dentry **dentry)
151151
{
@@ -205,7 +205,7 @@ static int create_by_name(const char *name, mode_t mode,
205205
* If securityfs is not enabled in the kernel, the value %-ENODEV is
206206
* returned.
207207
*/
208-
struct dentry *securityfs_create_file(const char *name, mode_t mode,
208+
struct dentry *securityfs_create_file(const char *name, umode_t mode,
209209
struct dentry *parent, void *data,
210210
const struct file_operations *fops)
211211
{

‎security/tomoyo/securityfs_if.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static const struct file_operations tomoyo_operations = {
224224
*
225225
* Returns nothing.
226226
*/
227-
static void __init tomoyo_create_entry(const char *name, const mode_t mode,
227+
static void __init tomoyo_create_entry(const char *name, const umode_t mode,
228228
struct dentry *parent, const u8 key)
229229
{
230230
securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key,

0 commit comments

Comments
 (0)