pledge for xclock. okan@ got to the same patch. I added autoconf goo
to make it possible to send it upstreams. ok deraadt@
This commit is contained in:
parent
f7d98a310c
commit
eedb4e77fa
@ -39,7 +39,7 @@ AC_CONFIG_HEADERS([config.h])
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS([strlcpy getpid])
|
AC_CHECK_FUNCS([strlcpy getpid pledge])
|
||||||
|
|
||||||
AM_ICONV
|
AM_ICONV
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ in this Software without prior written authorization from The Open Group.
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PLEDGE
|
||||||
|
# include <err.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
@ -224,6 +227,11 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PLEDGE
|
||||||
|
if (pledge("stdio", NULL) == -1)
|
||||||
|
err(1, "pledge");
|
||||||
|
#endif
|
||||||
|
|
||||||
XtAppMainLoop (app_con);
|
XtAppMainLoop (app_con);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user