Page MenuHomeFreeBSD

Update ypset(8) with the latest version from OpenBSD.
ClosedPublic

Authored by araujo on Aug 4 2015, 1:06 AM.
Tags
None
Referenced Files
F137310487: D3289.id.diff
Sat, Nov 22, 8:00 AM
F137251530: D3289.id7632.diff
Fri, Nov 21, 8:10 PM
Unknown Object (File)
Fri, Nov 21, 2:36 AM
Unknown Object (File)
Fri, Nov 21, 2:31 AM
Unknown Object (File)
Fri, Nov 21, 2:31 AM
Unknown Object (File)
Fri, Nov 21, 2:27 AM
Unknown Object (File)
Sun, Nov 9, 12:26 AM
Unknown Object (File)
Oct 16 2025, 10:44 PM
Subscribers

Details

Summary

Sync the code with OpenBSD.
Remove 3rd BSD clause.

Test Plan

Test to set another NIS server:
araujo@coxinha:/usr/src/usr.sbin/ypset# ypset -d freebsd 10.0.1.14
ypset: Cannot ypset for domain freebsd on host 10.0.1.14: RPC: Program unavailable - make sure ypbind was started with -ypset or -ypsetme

araujo@coxinha:/usr/src/usr.sbin/ypset# ypset -d freebsd 10.0.1.14

araujo@coxinha:/usr/src/usr.sbin/ypset# ypwhich -x
"passwd" is an alias for "passwd.byname"
"master.passwd" is an alias for "master.passwd.byname"
"shadow" is an alias for "shadow.byname"
"group" is an alias for "group.byname"
"networks" is an alias for "networks.byaddr"
"hosts" is an alias for "hosts.byaddr"
"protocols" is an alias for "protocols.bynumber"
"services" is an alias for "services.byname"
"aliases" is an alias for "mail.aliases"
"ethers" is an alias for "ethers.byname"

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

araujo retitled this revision from to Update ypset(8) with the latest version from OpenBSD..
araujo updated this object.
araujo edited the test plan for this revision. (Show Details)
araujo added reviewers: rodrigc, bapt.
usr.sbin/ypset/ypset.c
116

Why do you need these ? The extern declarations for the getopt(3) vars are provided by unistd.h.

Remove optarg and optind provided by unistd.h.
Spotted by @kib.

Thank you!

bapt edited edge metadata.

Hey Allan,

Could you please make a review on the manpage?

All the best.

usr.sbin/ypset/ypset.8
77

This could be a little more clear that the change is actually being applied to a remote system

"Change the YP binding of
.Ar host ,
rather than that of the local machine."

usr.sbin/ypset/ypset.c
71

Is there a reason to change this away from bzero?

98

The whitespace looks off here

125

style(9) requires a space here. Just undo the whitespace change

usr.sbin/ypset/ypset.8
77

Sorry, it is ypset and not ypchange, doesn't make any sense change it by your suggestion.

usr.sbin/ypset/ypset.c
71

Yes, bzero is considered deprecated in most of all OS. Also memset makes the code more portable!

125

Yes.

This revision is now accepted and ready to land.Aug 11 2015, 1:34 AM