Skip to content
Permalink
Browse files

Fix pr#256 pledge() too early.

expand_tilde() may be called multiple times.
  • Loading branch information
LordReg committed Dec 19, 2019
1 parent a86f709 commit 3d694d83541704247ebfaa33389ec507a2655cea
Showing with 3 additions and 3 deletions.
  1. +3 −3 spectrwm.c
@@ -1432,9 +1432,6 @@ expand_tilde(const char *s)
ppwd = strlen(user) == 0 ? getpwuid(getuid()) : getpwnam(user);
free(user);

if (pledge("stdio proc exec rpath", NULL) == -1)
err(1, "pledge");

if (ppwd == NULL)
result = strdup(sc);
else
@@ -13327,6 +13324,9 @@ main(int argc, char *argv[])

scan_config();

if (pledge("stdio proc exec rpath", NULL) == -1)
err(1, "pledge");

validate_spawns();

if (getenv("SWM_STARTED") == NULL)

0 comments on commit 3d694d8

Please sign in to comment.
You can’t perform that action at this time.