Comment 4 for bug 418974

Revision history for this message
Martin Pitt (pitti) wrote :

Please drop the postinst. It's brittle since it depends on gdm being configured already without an explicit depends (which we don't want). Now, you could create the system user if it isn't present, but a suid binary which other users can't run is still ugly.

The proper way to drop privileges is to call getpwnam(USER) and setuid(pw.pw_uid) at the start of your program, where USER is "gdm" or the ./configure option value from config.h.