- Update the BSD LICENSE and remove the 3rd clause.
- Sync the code with the OpenBSD version that is more modern.
- Code clean up.
Details
The test for ypwhich was connect to the server:
root@srcCODE:/usr/src/usr.bin/ypmatch # ypwhich
10.0.1.11
root@srcCODE:/usr/src/usr.bin/ypmatch # ypwhich -d freebsd -x
Use "passwd" for "passwd.byname"
Use "master.passwd" for "master.passwd.byname"
Use "shadow" for "shadow.byname"
Use "group" for "group.byname"
Use "networks" for "networks.byaddr"
Use "hosts" for "hosts.byaddr"
Use "protocols" for "protocols.bynumber"
Use "services" for "services.byname"
Use "aliases" for "mail.aliases"
Use "ethers" for "ethers.byname"
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
In OpenBSD, yplib_host.c is in a directory:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.sbin/ypserv/common/
If you are going to bring our yp code closer to OpenBSD, it would probably be a good idea to mirror
the same directory structure. That will make it easier to take fixes from OpenBSD in future.
I just realized that my last update here wasn't fully complete.
So here is the full patch.
| usr.bin/ypwhich/ypwhich.c | ||
|---|---|---|
| 53 ↗ | (On Diff #7592) | Shouldn't just #include "yplib_host.h" work, due to the -I compiler flag ? |
| 195 ↗ | (On Diff #7592) | It is strange to see both err(3) use and conversion from the err() to fprintf()/exit(). IMO err*() is preferrable. |
| 219 ↗ | (On Diff #7592) | you do not need braces around !notrans, sizeof/sizeof is better written as nitems(ypaliases) |
Address @kib comments with exception of nitems.
I have another patch for nitems as I need to change it
in most of the yp(8) tools.
| usr.bin/ypwhich/ypwhich.c | ||
|---|---|---|
| 103 ↗ | (On Diff #7594) | Why do you remove () around return values ? You explicitely violate the style(9). |
| usr.sbin/ypserv/common/yplib_host.c | ||
| 77 ↗ | (On Diff #7594) | err() ? There and in lot of places below. |
| 163 ↗ | (On Diff #7594) | According to style, there should be spaces around binary operations. |
| usr.bin/ypwhich/ypwhich.c | ||
|---|---|---|
| 103 ↗ | (On Diff #7594) | Agree with you, it was removed because these patches are from OpenBSD, they use this style for return. I will added it back to follow the style(9). |
| usr.sbin/ypserv/common/yplib_host.c | ||
| 77 ↗ | (On Diff #7594) | They are OpenBSD files, and need to send a patch to upstream first to check if they(OpenBSD) will accept the changes and will be easier in the future sync the code. If they doesn't accept, I will change it. (my current plan). |
| 163 ↗ | (On Diff #7594) | These two files weren't changed because I need to send a patch to OpenBSD, or otherwise in the future would be a bit hard to sync the code with them. However, if it is a must, I have no problem to make the change to follow the style(9). |
| usr.sbin/ypserv/common/yplib_host.c | ||
|---|---|---|
| 163 ↗ | (On Diff #7594) | No, it is not a must. |