Re: svn commit: r335612 - head/sbin/dhclient
On 2018-06-25 11:40:48 (-0700), Xin LI wrote: On Sun, Jun 24, 2018 at 6:30 PM Eitan Adler wrote: Author: eadler Date: Mon Jun 25 01:29:54 2018 New Revision: 335612 URL: https://svnweb.freebsd.org/changeset/base/335612 Log: dhclient: recorrect __progname to getprogname() A more correct way to modernize code that uses __progname is to just replace each occurance of it with a call to getprogname(3) We should probably take a look at dhcpcd or ISC dhclient and teach whatever we have chosen sandbox, etc. The current FreeBSD dhclient is based on an ancient ISC dhclient fork with enhancements from OpenBSD (but not being kept up-to-date with OpenBSD) and do not support IPv6, etc. The IPv6 support in ISC dhclient is basically having dhclient and dhclient6, which is a real pain to configure. NetBSD's dhcpcd is probably the best DHCP client these days in terms of completeness. Philip -- Philip Paeps Senior Reality Engineer Ministry of Information ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r335612 - head/sbin/dhclient
On Sun, Jun 24, 2018 at 6:30 PM Eitan Adler wrote: > > Author: eadler > Date: Mon Jun 25 01:29:54 2018 > New Revision: 335612 > URL: https://svnweb.freebsd.org/changeset/base/335612 > > Log: > dhclient: recorrect __progname to getprogname() > > A more correct way to modernize code that uses __progname is to just > replace each occurance of it with a call to getprogname(3) We should probably take a look at dhcpcd or ISC dhclient and teach whatever we have chosen sandbox, etc. The current FreeBSD dhclient is based on an ancient ISC dhclient fork with enhancements from OpenBSD (but not being kept up-to-date with OpenBSD) and do not support IPv6, etc. Cheers, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r335612 - head/sbin/dhclient
Author: eadler Date: Mon Jun 25 01:29:54 2018 New Revision: 335612 URL: https://svnweb.freebsd.org/changeset/base/335612 Log: dhclient: recorrect __progname to getprogname() A more correct way to modernize code that uses __progname is to just replace each occurance of it with a call to getprogname(3) Reported by: ian Reviewed by: imp Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Sun Jun 24 23:19:31 2018 (r335611) +++ head/sbin/dhclient/dhclient.c Mon Jun 25 01:29:54 2018 (r335612) @@ -149,7 +149,6 @@ int fork_privchld(int, int); #define MIN_MTU 68 static time_t scripttime; -static char*__progname; int findproto(char *cp, int n) @@ -379,12 +378,10 @@ main(int argc, char *argv[]) pid_totherpid; cap_rights_t rights; - __progname = basename(argv[0]); - init_casper(); /* Initially, log errors to stderr as well as to syslogd. */ - cap_openlog(capsyslog, __progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); + cap_openlog(capsyslog, getprogname(), LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); cap_setlogmask(capsyslog, LOG_UPTO(LOG_DEBUG)); while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1) @@ -566,7 +563,7 @@ void usage(void) { - fprintf(stderr, "usage: %s [-bdqu] ", __progname); + fprintf(stderr, "usage: %s [-bdqu] ", getprogname()); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); exit(1); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"