summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-15 23:24:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-15 23:24:43 +0000
commitb3177135bdb5bed6a88dafc4c672833c542ec091 (patch)
treefce9496e87b8d632f7bffbfcfd8731572ccdc04e /usr.bin/mg
parent89a6deaf15ff7422cfd847c74200248d5914289f (diff)
use fchmod and fchown instead; vincent
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c
index df1c027c17a..82eda688980 100644
--- a/usr.bin/mg/fileio.c
+++ b/usr.bin/mg/fileio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fileio.c,v 1.27 2002/03/27 17:42:37 millert Exp $ */
+/* $OpenBSD: fileio.c,v 1.28 2002/04/15 23:24:42 deraadt Exp $ */
/*
* POSIX fileio.c
@@ -68,8 +68,8 @@ ffwopen(const char *fn, BUFFER *bp)
* future writes will do the same thing.
*/
if (bp && bp->b_fi.fi_mode) {
- chmod(fn, bp->b_fi.fi_mode & 07777);
- chown(fn, bp->b_fi.fi_uid, bp->b_fi.fi_gid);
+ fchmod(fd, bp->b_fi.fi_mode & 07777);
+ fchown(fd, bp->b_fi.fi_uid, bp->b_fi.fi_gid);
}
return (FIOSUC);
}