mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2025-04-16 09:05:51 +00:00
Drop privileges when executing CLI
This commit is contained in:
parent
488af80a85
commit
568b12600b
1 changed files with 7 additions and 0 deletions
7
dist/arch/arsse.sh
vendored
7
dist/arch/arsse.sh
vendored
|
@ -1,3 +1,10 @@
|
|||
#! /usr/bin/php
|
||||
<?php
|
||||
if (posix_geteuid() == 0) {
|
||||
$info = posix_getpwnam("arsse");
|
||||
if ($info) {
|
||||
posix_setgid($info['gid']);
|
||||
posix_setuid($info['uid']);
|
||||
}
|
||||
}
|
||||
require "/usr/share/webapps/arsse/arsse.php";
|
||||
|
|
Loading…
Add table
Reference in a new issue