mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-21 15:17:01 +00:00
chasquid-util: Print errors to stderr
To make it more difficult to accidentally supress errors, or mistake them for legitimate output, print errors to stderr.
This commit is contained in:
@@ -40,7 +40,7 @@ if ! r user-add denied@domain --receive_only > /dev/null; then
|
||||
fi
|
||||
check_userdb
|
||||
|
||||
if r user-add xxx@domain --password=passwd --receive_only > /dev/null; then
|
||||
if r user-add xxx@domain --password=passwd --receive_only > /dev/null 2>&1; then
|
||||
echo user-add --password --receive_only worked
|
||||
exit 1
|
||||
fi
|
||||
@@ -50,12 +50,12 @@ if ! r authenticate user@domain --password=passwd > /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if r authenticate user@domain --password=abcd > /dev/null; then
|
||||
if r authenticate user@domain --password=abcd > /dev/null 2>&1; then
|
||||
echo authenticate with bad password worked
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if r authenticate denied@domain --password=abcd > /dev/null; then
|
||||
if r authenticate denied@domain --password=abcd > /dev/null 2>&1; then
|
||||
echo authenticate on a no-submission user worked
|
||||
exit 1
|
||||
fi
|
||||
@@ -82,7 +82,7 @@ if ! r user-remove user@domain > /dev/null; then
|
||||
fi
|
||||
check_userdb
|
||||
|
||||
if r authenticate user@domain --password=passwd > /dev/null; then
|
||||
if r authenticate user@domain --password=passwd > /dev/null 2>&1; then
|
||||
echo authenticate for removed user worked
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user