mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
pledge() earlier
This commit is contained in:
parent
d720496250
commit
ff1909e7f4
1 changed files with 6 additions and 6 deletions
12
spectrwm.c
12
spectrwm.c
|
@ -1360,6 +1360,9 @@ expand_tilde(const char *s)
|
|||
ppwd = strlen(user) == 0 ? getpwuid(getuid()) : getpwnam(user);
|
||||
free(user);
|
||||
|
||||
if (pledge("stdio proc exec cpath rpath wpath fattr", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
if (ppwd == NULL)
|
||||
result = strdup(sc);
|
||||
else
|
||||
|
@ -3117,6 +3120,9 @@ xft_init(struct swm_region *r)
|
|||
free(str);
|
||||
}
|
||||
|
||||
if (pledge("stdio proc exec", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
if (bar_font == NULL)
|
||||
errx(1, "unable to open a font");
|
||||
|
||||
|
@ -12606,9 +12612,6 @@ noconfig:
|
|||
if (cfile)
|
||||
conf_load(cfile, SWM_CONF_DEFAULT);
|
||||
|
||||
if (pledge("stdio proc exec cpath rpath wpath fattr", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
validate_spawns();
|
||||
|
||||
if (getenv("SWM_STARTED") == NULL)
|
||||
|
@ -12620,9 +12623,6 @@ noconfig:
|
|||
TAILQ_FOREACH(r, &screens[i].rl, entry)
|
||||
bar_setup(r);
|
||||
|
||||
if (pledge("stdio proc exec", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
/* Manage existing windows. */
|
||||
grab_windows();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue