changing UID/GID after startup of pluto/charon
added --with-uid/--with-gid configure option
This commit is contained in:
@@ -255,14 +255,16 @@ static void receive_packets(private_receiver_t *this)
|
||||
(int)pthread_self());
|
||||
|
||||
/* drop threads capabilities */
|
||||
charon->drop_capabilities(charon, FALSE, FALSE);
|
||||
charon->drop_capabilities(charon, TRUE, FALSE, FALSE);
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
/* read in a packet */
|
||||
if (charon->socket->receive(charon->socket, &packet) != SUCCESS)
|
||||
{
|
||||
DBG1(DBG_NET, "receiving from socket failed!");
|
||||
DBG2(DBG_NET, "receiving from socket failed!");
|
||||
/* try again after a delay */
|
||||
sleep(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ static void send_packets(private_sender_t * this)
|
||||
DBG1(DBG_NET, "sender thread running, thread_ID: %06u", (int)pthread_self());
|
||||
|
||||
/* drop threads capabilities */
|
||||
charon->drop_capabilities(charon, FALSE, FALSE);
|
||||
charon->drop_capabilities(charon, TRUE, FALSE, FALSE);
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user