adbd-pam-session: close all FDs in child, not in parent
On parent, various PAM modules might open FDs for their own purposes. We cannot close them, otherwise problems occur.
For example, Go runtime in pam_fscrypt panics if its FD gets closed, which cause adbd-pam-session to crash. This (presumabely) leads adbd to close PTY master, causing bash to receive SIGHUP and quit.
Another problem is when pam_systemd's FD is closed, logind will think that our logind session is ending. Fortunately by default Systemd in Ubuntu doesn't kill all the sesion's children when this occur.
Both problems are fixed with this commit.
On the other hand, those FDs shouldn't be passed to exec'ed program in the child process, so close them.
CC: @gberh -- do you happen to remember why closefrom() call is in the parent section in the first place?