diff options
| -rw-r--r-- | sys/src/cmd/auth/lib/wrbio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/src/cmd/auth/lib/wrbio.c b/sys/src/cmd/auth/lib/wrbio.c index e50ca500b..9c688dbe1 100644 --- a/sys/src/cmd/auth/lib/wrbio.c +++ b/sys/src/cmd/auth/lib/wrbio.c @@ -11,8 +11,11 @@ wrbio(char *file, Acctbio *a) int i, fd, n; fd = open(file, OWRITE); - if(fd < 0) - error("can't open %s", file); + if(fd < 0){ + fd = create(file, OWRITE, 0660); + if(fd < 0) + error("can't create %s", file); + } if(seek(fd, 0, 2) < 0) error("can't seek %s", file); |
