forked from lda/telodendria
Don't chroot() on OpenBSD (pledge() causes it to trap here)
This commit is contained in:
parent
c23f817a55
commit
0fa2da8177
1 changed files with 2 additions and 0 deletions
|
@ -386,6 +386,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if (getuid() == 0)
|
if (getuid() == 0)
|
||||||
{
|
{
|
||||||
|
#ifndef __OpenBSD__ /* chroot() is only useful without unveil() */
|
||||||
if (chroot(".") == 0)
|
if (chroot(".") == 0)
|
||||||
{
|
{
|
||||||
Log(lc, LOG_DEBUG, "Changed the root directory to: %s.", tConfig->dataDir);
|
Log(lc, LOG_DEBUG, "Changed the root directory to: %s.", tConfig->dataDir);
|
||||||
|
@ -394,6 +395,7 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Log(lc, LOG_WARNING, "Unable to chroot into directory: %s.", tConfig->dataDir);
|
Log(lc, LOG_WARNING, "Unable to chroot into directory: %s.", tConfig->dataDir);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (userInfo && groupInfo)
|
if (userInfo && groupInfo)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue