Page MenuHomeFreeBSD

Add pw_mkdb2() to libutil
ClosedPublic

Authored by bapt on Jun 3 2015, 8:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 1:38 PM
Unknown Object (File)
Wed, Nov 6, 11:54 AM
Unknown Object (File)
Tue, Oct 29, 6:55 PM
Unknown Object (File)
Oct 12 2024, 1:48 PM
Unknown Object (File)
Oct 5 2024, 9:47 PM
Unknown Object (File)
Sep 13 2024, 10:37 PM
Unknown Object (File)
Sep 13 2024, 10:37 PM
Unknown Object (File)
Sep 13 2024, 10:37 PM
Subscribers

Details

Summary

Add a pw_mkdb2 function that allows to pass the endianness for the
database to generate

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt retitled this revision from to Add pw_mkdb2() to libutil.
bapt updated this object.
bapt edited the test plan for this revision. (Show Details)
ian added a reviewer: ian.
ian added a subscriber: ian.

Looks good to me, modulo the one typo that needs fixing.

lib/libutil/pw_util.c
249 ↗(On Diff #5925)

s/b PWDB_NATIVE

This revision is now accepted and ready to land.Jun 3 2015, 8:41 PM
This revision was automatically updated to reflect the committed changes.
bapt marked an inline comment as done.
wblock added inline comments.
head/lib/libutil/pw_util.3
237

Remove "function":

regenerates the password database by running

248

These sentences should be capitalized:

The database...

250

Capitalize.

252

Capitalize.

bapt marked 3 inline comments as done.Jun 3 2015, 10:01 PM

Capitalization has been committed

head/lib/libutil/pw_util.3
237

All previous functions have: The <functionname> function ...
So either I should remove "The" and "function" everywhere or I add the missing "The" here. I have no strong opinion here, what about you? :)

head/lib/libutil/pw_util.3
237

"The blahblah function" is only needed if it is unclear whether blahblah is a function. Usually it is shorter and simpler to just use the name.

I restricted my review to changed lines, but most of the other uses are redundant also.

250

Oops, missed the first time: "little-endian" should not be capitalized. Also, passive->active: s/will be/is/. This should probably be more specific, too:
The database is generated in little-endian byte order.

(Just winging it, you might have a better way to say this.)

252

The database is generated in big-endian byte order.

head/lib/libutil/pw_util.3
250

"is generated" is still passive voice. I don't have the problem with passive voice that most people seem to, but if you want to go active-voice you need an action verb, not a state-of-being verb. E.g., "Generate the database in little-endian byte order."

head/lib/libutil/pw_util.3
250

You're right, it's easy to see one problem but miss others. New version:

Generate the database in little-endian byte order.

252

As above:

Generate the database in big-endian byte order.