Page MenuHomeFreeBSD

Improve error messages for vipw
AbandonedPublic

Authored by fernape on Mar 28 2018, 6:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 4 2024, 9:55 AM
Unknown Object (File)
Feb 27 2024, 2:50 PM
Unknown Object (File)
Jan 14 2024, 1:41 AM
Unknown Object (File)
Dec 20 2023, 8:26 AM
Unknown Object (File)
Nov 6 2023, 7:08 PM
Unknown Object (File)
Oct 24 2023, 9:27 AM
Unknown Object (File)
Sep 30 2023, 3:24 PM
Unknown Object (File)
Aug 17 2023, 12:48 AM
Subscribers

Details

Reviewers
tz
tcberner
des
Summary

This comes from PR 40572
In current, right now:

# EDITOR=false vipw
vipw: pw_edit(): No such file or directory

which doesn't seem too user friendly.

Adding des as reviewer since he seems to know the code pretty well according
to the svn log.

Test Plan

Test case 1:

# export EDITOR=false
# vipw
'false' failed with error code 1: Operation not permitted
vipw: no changes made

Teste case 2:

# export EDITOR=/home/test/idontexist
# vipw
'/home/test/idontexist' failed with error code 2: No such file or directory
vipw: no changes made

Test case 3:

# export EDITOR=vim
# vipw
(I write the file)
vipw: password list updated

Test case 4:

# export EDITOR=vim
# vipw
(I do not write the file)
vipw: no changes made

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15896
Build 15896: arc lint + arc unit

Event Timeline

fernape edited the test plan for this revision. (Show Details)

Typo fix in comment.

lib/libutil/pw_util.c
362

s/acces/access/

Fix typo in comment reported by bcr@

I think as this is not in ports/ I cannot contribute much here :D

I think as this is not in ports/ I cannot contribute much here :D

OK. Let's see if someone with commit in base has a look :)