Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4db55fd
)
userplex: Corrected opening of /dev/null.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 13 May 2012 06:09:48 +0000
(08:09 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 13 May 2012 06:09:48 +0000
(08:09 +0200)
src/userplex.c
patch
|
blob
|
blame
|
history
diff --git
a/src/userplex.c
b/src/userplex.c
index
699cbe5
..
357d791
100644
(file)
--- a/
src/userplex.c
+++ b/
src/userplex.c
@@
-87,12
+87,12
@@
static void login(struct passwd *pwd)
* getting Kerberos credentials, running PAM session modules, and
* who knows what. I'll add them along as I find them useful. */
if(((fd = open(".ashd/output", O_WRONLY | O_APPEND)) >= 0) ||
* getting Kerberos credentials, running PAM session modules, and
* who knows what. I'll add them along as I find them useful. */
if(((fd = open(".ashd/output", O_WRONLY | O_APPEND)) >= 0) ||
- ((fd = open("/dev/null",
0
)) >= 0)) {
+ ((fd = open("/dev/null",
O_WRONLY
)) >= 0)) {
dup2(fd, 1);
close(fd);
}
if(((fd = open(".ashd/error", O_WRONLY | O_APPEND)) >= 0) ||
dup2(fd, 1);
close(fd);
}
if(((fd = open(".ashd/error", O_WRONLY | O_APPEND)) >= 0) ||
- ((fd = open("/dev/null",
0
)) >= 0)) {
+ ((fd = open("/dev/null",
O_WRONLY
)) >= 0)) {
dup2(fd, 2);
close(fd);
}
dup2(fd, 2);
close(fd);
}