projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1219799
)
Revert "string.c: Use $HOME to get the home directory."
author
Andre Noll
<maan@systemlinux.org>
Mon, 17 Sep 2007 17:08:58 +0000
(19:08 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Mon, 17 Sep 2007 17:08:58 +0000
(19:08 +0200)
This reverts commit
379a2724984d903b7be8981a85b6cc82cab6ea90
.
It doesn't play well with the -u option of para_server.
string.c
patch
|
blob
|
history
diff --git
a/string.c
b/string.c
index 0d7e05e66c3f8c88cb4738ff72ad9047f63cc07c..60050ad7afaf822acd6883c08c222808ce1bbeab 100644
(file)
--- a/
string.c
+++ b/
string.c
@@
-300,8
+300,8
@@
__must_check __malloc char *para_logname(void)
*/
__must_check __malloc char *para_homedir(void)
{
-
char *h = getenv("HOME"
);
- return para_strdup(
h? h
: "/tmp");
+
struct passwd *pw = getpwuid(getuid()
);
+ return para_strdup(
pw? pw->pw_dir
: "/tmp");
}
/**