提交 2570ebbd 编写于 作者: A Al Viro

switch kern_ipc_perm to umode_t

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 0583fcc9
...@@ -468,7 +468,7 @@ extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); ...@@ -468,7 +468,7 @@ extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
#define audit_get_sessionid(t) ((t)->sessionid) #define audit_get_sessionid(t) ((t)->sessionid)
extern void audit_log_task_context(struct audit_buffer *ab); extern void audit_log_task_context(struct audit_buffer *ab);
extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
extern int audit_bprm(struct linux_binprm *bprm); extern int audit_bprm(struct linux_binprm *bprm);
extern void audit_socketcall(int nargs, unsigned long *args); extern void audit_socketcall(int nargs, unsigned long *args);
extern int audit_sockaddr(int len, void *addr); extern int audit_sockaddr(int len, void *addr);
...@@ -494,7 +494,7 @@ static inline void audit_fd_pair(int fd1, int fd2) ...@@ -494,7 +494,7 @@ static inline void audit_fd_pair(int fd1, int fd2)
if (unlikely(!audit_dummy_context())) if (unlikely(!audit_dummy_context()))
__audit_fd_pair(fd1, fd2); __audit_fd_pair(fd1, fd2);
} }
static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode)
{ {
if (unlikely(!audit_dummy_context())) if (unlikely(!audit_dummy_context()))
__audit_ipc_set_perm(qbytes, uid, gid, mode); __audit_ipc_set_perm(qbytes, uid, gid, mode);
......
...@@ -93,7 +93,7 @@ struct kern_ipc_perm ...@@ -93,7 +93,7 @@ struct kern_ipc_perm
gid_t gid; gid_t gid;
uid_t cuid; uid_t cuid;
gid_t cgid; gid_t cgid;
mode_t mode; umode_t mode;
unsigned long seq; unsigned long seq;
void *security; void *security;
}; };
......
...@@ -210,12 +210,12 @@ struct audit_context { ...@@ -210,12 +210,12 @@ struct audit_context {
struct { struct {
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
mode_t mode; umode_t mode;
u32 osid; u32 osid;
int has_perm; int has_perm;
uid_t perm_uid; uid_t perm_uid;
gid_t perm_gid; gid_t perm_gid;
mode_t perm_mode; umode_t perm_mode;
unsigned long qbytes; unsigned long qbytes;
} ipc; } ipc;
struct { struct {
...@@ -1249,7 +1249,7 @@ static void show_special(struct audit_context *context, int *call_panic) ...@@ -1249,7 +1249,7 @@ static void show_special(struct audit_context *context, int *call_panic)
case AUDIT_IPC: { case AUDIT_IPC: {
u32 osid = context->ipc.osid; u32 osid = context->ipc.osid;
audit_log_format(ab, "ouid=%u ogid=%u mode=%#o", audit_log_format(ab, "ouid=%u ogid=%u mode=%#ho",
context->ipc.uid, context->ipc.gid, context->ipc.mode); context->ipc.uid, context->ipc.gid, context->ipc.mode);
if (osid) { if (osid) {
char *ctx = NULL; char *ctx = NULL;
...@@ -1267,7 +1267,7 @@ static void show_special(struct audit_context *context, int *call_panic) ...@@ -1267,7 +1267,7 @@ static void show_special(struct audit_context *context, int *call_panic)
ab = audit_log_start(context, GFP_KERNEL, ab = audit_log_start(context, GFP_KERNEL,
AUDIT_IPC_SET_PERM); AUDIT_IPC_SET_PERM);
audit_log_format(ab, audit_log_format(ab,
"qbytes=%lx ouid=%u ogid=%u mode=%#o", "qbytes=%lx ouid=%u ogid=%u mode=%#ho",
context->ipc.qbytes, context->ipc.qbytes,
context->ipc.perm_uid, context->ipc.perm_uid,
context->ipc.perm_gid, context->ipc.perm_gid,
...@@ -2260,7 +2260,7 @@ void __audit_ipc_obj(struct kern_ipc_perm *ipcp) ...@@ -2260,7 +2260,7 @@ void __audit_ipc_obj(struct kern_ipc_perm *ipcp)
* *
* Called only after audit_ipc_obj(). * Called only after audit_ipc_obj().
*/ */
void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode)
{ {
struct audit_context *context = current->audit_context; struct audit_context *context = current->audit_context;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册