madscientist / msjnc

MadScientist Juniper Network Connect Session Manager
MIT License
69 stars 20 forks source link

"Connected" status does not work when using ncsvc-wrapper #21

Closed s19n closed 8 years ago

s19n commented 8 years ago

When using msjnc together with https://github.com/simpkins/ncsvc-wrapper to prevent ncsvc from manipulating the routing table, the interface does not "notice" the successful connection. ncsvc runs correctly in the background, as stated in the last line of .msjnc.log:

Writing passwd to child: [REDACTED] Running pid 26324 in the background

s19n commented 8 years ago

Nevermind, it seems that msjnc uses the ncsvc.log file to detect if the connection has been successful, and when the wrapper does the following the log is written to the root's home directory instead of the user's one:

/*
* Set the UID and GID to 0
* Otherwise ld.so will ignore LD_PRELOAD.
*/
setreuid(0, 0);
setregid(0, 0);