]> WPIA git - gigi.git/blob - natives/README.md
add: functionality to promote a user via test manager to RA Agent
[gigi.git] / natives / README.md
1 This native method exposes the *man:setuid(2)* and *man:setgid(2)* system calls to Java.
2 Java code can call `club.wpia.gigi.natives.SetUID.setUid(uid, gid)` to set the user and group ID to the specified values if they’re currently different.
3
4 Gigi can use this to bind to Internet domain privileged ports (port numbers below 1024)
5 when started as root and then drop privileges by changing to a non-root user.
6
7 It should be noted that this is rarely necessary;
8 it is much safer to start Gigi as a regular user with `CAP_NET_BIND_SERVICE` (see *man:capabilities(7)*).
9 Gigi can also inherit its socket from the environment (file descriptor 0),
10 e. g. from systemd (see *man:systemd.socket(5)*) or (x)inetd.