зеркало из https://github.com/mono/xsp.git
[Shim] Drop egid -> gid
This commit is contained in:
Родитель
20a445aea7
Коммит
7f256b8e04
|
@ -157,8 +157,10 @@ int main (int argc, char * argv [])
|
|||
{
|
||||
uid_t euid = geteuid ();
|
||||
setreuid (euid, euid);
|
||||
log1 ("Started.");
|
||||
log ("I'm uid %d euid %d", getuid (), geteuid ());
|
||||
gid_t egid = getegid ();
|
||||
setregid (egid, egid);
|
||||
log1 ("Started.");
|
||||
log ("I'm uid %d euid %d gid %d egid %d", getuid (), geteuid (), getgid (), getegid ());
|
||||
|
||||
if (argc <= 2) {
|
||||
fprintf (stderr, "Usage: %s <socket> <command>\n", argv [0]);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
. vars.sh
|
||||
|
||||
sudo rm -r $SOCKDIR $SHIMDIR $CONFIGDIR $WEBDIR
|
|
@ -36,7 +36,7 @@ do
|
|||
sudo chmod 750 $USERDIR
|
||||
fi
|
||||
if [ ! -f "$USERDIR/index.aspx" ]; then
|
||||
echo "<p>$USER</p>\n<p><%=\"Test\"%></p>" | sudo tee $USERDIR/index.aspx > /dev/null
|
||||
echo -e "<p>$USER</p>\n<p><%=\"Test\"%></p>" | sudo tee $USERDIR/index.aspx > /dev/null
|
||||
sudo chown $USER $USERDIR/index.aspx
|
||||
fi
|
||||
done
|
||||
|
|
Загрузка…
Ссылка в новой задаче