From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, linux-security-module@wirex.com
Subject: Re: [PATCH] More LSM changes for 2.5.49
Date: Wed, 27 Nov 2002 16:28:05 -0800 [thread overview]
Message-ID: <20021128002805.GF7187@kroah.com> (raw)
In-Reply-To: <20021128002730.GE7187@kroah.com>
ChangeSet 1.927, 2002/11/27 15:12:52-08:00, greg@kroah.com
LSM: change if statements into something more readable for the ipc/*, mm/*, and net/* files.
diff -Nru a/ipc/msg.c b/ipc/msg.c
--- a/ipc/msg.c Wed Nov 27 15:18:04 2002
+++ b/ipc/msg.c Wed Nov 27 15:18:04 2002
@@ -101,7 +101,8 @@
msq->q_perm.key = key;
msq->q_perm.security = NULL;
- if ((retval = security_msg_queue_alloc(msq))) {
+ retval = security_msg_queue_alloc(msq);
+ if (retval) {
ipc_rcu_free(msq, sizeof(*msq));
return retval;
}
diff -Nru a/ipc/sem.c b/ipc/sem.c
--- a/ipc/sem.c Wed Nov 27 15:18:04 2002
+++ b/ipc/sem.c Wed Nov 27 15:18:04 2002
@@ -136,7 +136,8 @@
sma->sem_perm.key = key;
sma->sem_perm.security = NULL;
- if ((retval = security_sem_alloc(sma))) {
+ retval = security_sem_alloc(sma);
+ if (retval) {
ipc_rcu_free(sma, size);
return retval;
}
diff -Nru a/ipc/shm.c b/ipc/shm.c
--- a/ipc/shm.c Wed Nov 27 15:18:04 2002
+++ b/ipc/shm.c Wed Nov 27 15:18:04 2002
@@ -188,7 +188,8 @@
shp->shm_flags = (shmflg & S_IRWXUGO);
shp->shm_perm.security = NULL;
- if ((error = security_shm_alloc(shp))) {
+ error = security_shm_alloc(shp);
+ if (error) {
ipc_rcu_free(shp, sizeof(*shp));
return error;
}
diff -Nru a/mm/mmap.c b/mm/mmap.c
--- a/mm/mmap.c Wed Nov 27 15:18:04 2002
+++ b/mm/mmap.c Wed Nov 27 15:18:04 2002
@@ -504,7 +504,8 @@
}
}
- if ((error = security_file_mmap(file, prot, flags)))
+ error = security_file_mmap(file, prot, flags);
+ if (error)
return error;
/* Clear old maps */
diff -Nru a/mm/mprotect.c b/mm/mprotect.c
--- a/mm/mprotect.c Wed Nov 27 15:18:04 2002
+++ b/mm/mprotect.c Wed Nov 27 15:18:04 2002
@@ -263,7 +263,8 @@
goto out;
}
- if ((error = security_file_mprotect(vma, prot)))
+ error = security_file_mprotect(vma, prot);
+ if (error)
goto out;
if (vma->vm_end > end) {
diff -Nru a/net/core/scm.c b/net/core/scm.c
--- a/net/core/scm.c Wed Nov 27 15:18:04 2002
+++ b/net/core/scm.c Wed Nov 27 15:18:04 2002
@@ -217,7 +217,8 @@
for (i=0, cmfptr=(int*)CMSG_DATA(cm); i<fdmax; i++, cmfptr++)
{
int new_fd;
- if ((err = security_file_receive(fp[i])))
+ err = security_file_receive(fp[i]);
+ if (err)
break;
err = get_unused_fd();
if (err < 0)
next prev parent reply other threads:[~2002-11-28 0:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-27 23:06 [BK PATCH] " Greg KH
2002-11-28 0:26 ` [PATCH] " Greg KH
2002-11-28 0:27 ` Greg KH
2002-11-28 0:28 ` Greg KH [this message]
2002-11-28 0:28 ` Greg KH
2002-11-28 0:28 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021128002805.GF7187@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@wirex.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®