[systemd-commits] 2 commits - man/systemd.xml src/pam-module.c
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Mar 10 11:49:26 PST 2011
man/systemd.xml | 2 +-
src/pam-module.c | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 90102b22ba0a9a6aa8ff1b9d32349e100902a8d7
Author: Andrey Borzenkov <arvidjaar at gmail.com>
Date: Thu Mar 10 17:39:02 2011 +0300
pam: do not leak file descriptor if flock fails
If flock fails, fd is not returned to caller so it cannot clean up.
diff --git a/src/pam-module.c b/src/pam-module.c
index 7f91584..e1a1a50 100644
--- a/src/pam-module.c
+++ b/src/pam-module.c
@@ -198,8 +198,12 @@ static int open_file_and_lock(const char *fn) {
* as the filesystems in question should be local, and only
* locally accessible, and most likely even tmpfs. */
- if (flock(fd, LOCK_EX) < 0)
- return -errno;
+ if (flock(fd, LOCK_EX) < 0) {
+ int r = -errno;
+
+ close_nointr_nofail(fd);
+ return r;
+ }
return fd;
}
commit 756a8d17bb106f9624736843377e7831b195fac7
Author: Andrey Borzenkov <arvidjaar at gmail.com>
Date: Thu Mar 10 20:31:18 2011 +0300
man: trivial typo in systemd(1)
diff --git a/man/systemd.xml b/man/systemd.xml
index 2c42a02..6b1a4c9 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -269,7 +269,7 @@
<option>syslog</option>,
<option>syslog+console</option>,
<option>kmsg</option>,
- <option>kmsg-console</option>. If the
+ <option>kmsg+console</option>. If the
argument is omitted it defaults to
<option>inherit</option>.</para></listitem>
</varlistentry>
More information about the systemd-commits
mailing list