mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Make cu/tip handle when $HOME is not set in the environment.
Approved by: philip Submitted by: ale PR: bin/108775
This commit is contained in:
parent
c8651f7400
commit
ee35eb7aa1
1 changed files with 5 additions and 1 deletions
|
|
@ -74,7 +74,11 @@ vinit(void)
|
|||
* Read the .tiprc file in the HOME directory
|
||||
* for sets
|
||||
*/
|
||||
if (strlen(value(HOME)) + sizeof("/.tiprc") > sizeof(file)) {
|
||||
cp = value(HOME);
|
||||
if (cp == NULL) {
|
||||
(void)fprintf(stderr,
|
||||
"$HOME not set. Skipping check for ~/.tiprc\n");
|
||||
} else if (strlen(cp) + sizeof("/.tiprc") > sizeof(file)) {
|
||||
(void)fprintf(stderr, "Home directory path too long: %s\n",
|
||||
value(HOME));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue