]> git.ipfire.org Git - thirdparty/util-linux.git/commit
agetty: return proper value if compiled without ISSUEDIR support
authorPatrick Steinhardt <ps@pks.im>
Wed, 11 Dec 2019 13:44:22 +0000 (14:44 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 12 Dec 2019 11:22:28 +0000 (12:22 +0100)
commitc0274f8add670dd16ba4f3efe6f737266ebaac06
tree5a8978a027e1a05aa0308d92f5bab0a085f1d58a
parent393f266c7697fd72e61f4d04a9e05d7457415f33
agetty: return proper value if compiled without ISSUEDIR support

If agetty is compiled without support for ISSUEDIR, then it implements
a stub for `issuedir_read` that simply does nothing. In fact it does
too little, as it doesn't have a proper return statement even though the
function returns an integer.

Fix the issue by always returning `1` from `issuedir_read`. This
is the same error code that the real implementation of that function
returns in case it cannot open the directory and is thus a sensible
default to pretend that the directory doesn't exist.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
term-utils/agetty.c