search for: getpwhome

Displaying 2 results from an estimated 2 matches for "getpwhome".

Did you mean: getphone
2020 Mar 28
0
[klibc:update-dash] dash: expand: Use HOME in tilde expansion when it is empty
...n Hutchings <ben at decadent.org.uk> --- usr/dash/expand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/dash/expand.c b/usr/dash/expand.c index 6ea0562f..f1f5a9fa 100644 --- a/usr/dash/expand.c +++ b/usr/dash/expand.c @@ -385,7 +385,7 @@ done: } else { home = getpwhome(name); } - if (!home || !*home) + if (!home) goto lose; *p = c; strtodest(home, SQSYNTAX, quotes);
2020 Mar 28
0
[klibc:update-dash] dash: expand: Do not reprocess data when expanding words
...+ p = startp; name = p + 1; while ((c = *++p) != '\0') { @@ -376,19 +370,21 @@ exptilde(char *startp, char *p, int flag) } } done: + if (flag & EXP_DISCARD) + goto out; *p = '\0'; if (*name == '\0') { home = lookupvar(homestr); } else { home = getpwhome(name); } + *p = c; if (!home) goto lose; - *p = c; strtodest(home, flag | EXP_QUOTED); +out: return (p); lose: - *p = c; return (startp); } @@ -437,63 +433,43 @@ removerecordregions(int endoff) * Expand arithmetic expression. Backup to start of expression, * evaluate, place re...