summaryrefslogtreecommitdiffstats
path: root/term-utils/wall.c
diff options
context:
space:
mode:
authorDave Reisner2012-06-02 19:31:30 +0200
committerSami Kerola2012-06-02 20:29:12 +0200
commit3c4fed097ddb65dbe3d88f60caee78fb60756f3e (patch)
treea7cd7247ca4fbda414846a93754e1e388fece136 /term-utils/wall.c
parentdocs: fix all man page groff warnings (diff)
downloadkernel-qcow2-util-linux-3c4fed097ddb65dbe3d88f60caee78fb60756f3e.tar.gz
kernel-qcow2-util-linux-3c4fed097ddb65dbe3d88f60caee78fb60756f3e.tar.xz
kernel-qcow2-util-linux-3c4fed097ddb65dbe3d88f60caee78fb60756f3e.zip
fileutils: xmkstemp() interface change
We can not let the user control where TMPDIR is for this tempfile. This will be where we write the updated passwd file, and must be capable of being moved atomically with rename(2). Therefore, it cannot be on a different device, or setpwnam() and vipw/vigr programs will invariably fail with EXDEV. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/wall.c')
-rw-r--r--term-utils/wall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c
index 0291a5b60..3255a5166 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -190,7 +190,7 @@ makemsg(char *fname, size_t *mbufsize, int print_banner)
line_max = sysconf(_SC_LINE_MAX);
lbuf = xmalloc(line_max);
- if ((fp = xfmkstemp(&tmpname)) == NULL)
+ if ((fp = xfmkstemp(&tmpname, NULL)) == NULL)
err(EXIT_FAILURE, _("can't open temporary file"));
unlink(tmpname);
free(tmpname);