chiark / gitweb /
even chattier logging
[disorder] / lib / configuration.c
index 35573c5c15dc6d03c26248315cc509132f21facb..c1bb8fcab323d6d77f2e87f68169f7be0d76b301 100644 (file)
@@ -1186,6 +1186,8 @@ char *config_private(void) {
 char *config_userconf(const char *home, const struct passwd *pw) {
   char *s;
 
+  if(!home && !pw && !(pw = getpwuid(getuid())))
+    fatal(0, "cannot determine our username");
   byte_xasprintf(&s, "%s/.disorder/passwd", home ? home : pw->pw_dir);
   return s;
 }