[Bug 40572] vipw(8) prints silly message if $EDITOR fails
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Feb 19 18:47:24 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=40572
fernando.apesteguia at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fernando.apesteguia at gmail.c
| |om
--- Comment #2 from fernando.apesteguia at gmail.com ---
Created attachment 190815
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190815&action=edit
patch to lib/libutil/pw_util.c
With this patch, we have a nicer output. The point is to return 0 (file not
modified) if the processes exited abnormally. I think it is pretty much the
correct behavior. With this patch, on -CURRENT, this is the output:
# export EDITOR=false
# vipw
'false' failed with error code 1: Operation not permitted
vipw: no changes made
# export EDITOR=/home/test/idontexist
# vipw
'/home/test/idontexist' failed with error code 2: No such file or directory
vipw: no changes made
# export EDITOR=vim
# vipw
(I write the file)
vipw: password list updated
# vipw
(I do not write the file)
vipw: no changes made
The patch can me MFC'd to 11 cleanly.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list