diff --git a/ChangeLog b/ChangeLog index da913ac90..fb911ff92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-03-18 Richard Frith-Macdonald + + * Tools/gdomap.c: Become an unpriveliged user after binding to + port 538 (for which we need to be root). This should relieve + some security considerations. + 2000-03-18 Richard Frith-Macdonald * Source/NSNumber.m: Added private methods from concrete class. diff --git a/Tools/gdomap.c b/Tools/gdomap.c index b2a8ea2ad..34522ef89 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -1173,6 +1173,19 @@ init_ports() exit(1); } + /* + * Try to become a 'safe' user now that we have + * done everything that needs root priv. + */ + if (getuid () != 0) + { + setuid (getuid ()); + } + else + { + setuid (-1); + } + /* * Set up masks to say we are interested in these descriptors. */ @@ -2984,7 +2997,6 @@ main(int argc, char** argv) printf(" tcp_foreign, udp_foreign.\n"); printf("-U name unregister name locally then quit.\n"); printf("-a file use config file for interface list.\n"); - printf("-p disable udp broadcast for probe\n"); printf("-c file use config file for probe.\n"); printf("-d extra debug logging.\n"); printf("-f avoid fork() to make debugging easy\n");