chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5464a25
)
don't fatal() if cannot create a root account
author
Richard Kettlewell
<rjk@greenend.org.uk>
Mon, 19 Nov 2007 21:04:31 +0000
(21:04 +0000)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Mon, 19 Nov 2007 21:04:31 +0000
(21:04 +0000)
server/setup.c
patch
|
blob
|
blame
|
history
diff --git
a/server/setup.c
b/server/setup.c
index 47cbc873ee6e57966658ab2f5ca2293d7d82a34a..4ccb00e802afd419af3be666de1136eaa82dcf8c 100644
(file)
--- a/
server/setup.c
+++ b/
server/setup.c
@@
-66,8
+66,10
@@
void make_root_login(void) {
gcry_randomize(pwbin, sizeof pwbin, GCRY_STRONG_RANDOM);
pwhex = hex(pwbin, sizeof pwbin);
/* Create the file */
gcry_randomize(pwbin, sizeof pwbin, GCRY_STRONG_RANDOM);
pwhex = hex(pwbin, sizeof pwbin);
/* Create the file */
- if((fd = open(privconfignew, O_WRONLY|O_CREAT, 0600)) < 0)
- fatal(errno, "error creating %s", privconfignew);
+ if((fd = open(privconfignew, O_WRONLY|O_CREAT, 0600)) < 0) {
+ error(errno, "error creating %s", privconfignew);
+ return; /* not fatal! */
+ }
/* Fix permissions */
if(pw) {
if(fchown(fd, 0, pw->pw_gid) < 0)
/* Fix permissions */
if(pw) {
if(fchown(fd, 0, pw->pw_gid) < 0)