aboutsummaryrefslogtreecommitdiff
path: root/trans/password.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-19 21:20:57 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 18:42:22 +0200
commit835b293d35a209d38047126443d41fa7090daa4c (patch)
tree5bf956895e6030f91cd618fb191b2151f6d25423 /trans/password.c
parentdc0b5a43224999223a246870912b0f292b1980e9 (diff)
downloadhurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz
hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2
hurd-835b293d35a209d38047126443d41fa7090daa4c.zip
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating errors much easier.
Diffstat (limited to 'trans/password.c')
-rw-r--r--trans/password.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trans/password.c b/trans/password.c
index 9ffcaa0a..b9f9c5bd 100644
--- a/trans/password.c
+++ b/trans/password.c
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include <argp.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <errno.h>
#include <error.h>
#include <stdlib.h>
@@ -151,7 +151,7 @@ S_password_check_user (struct trivfs_protid *cred, uid_t user, char *pw,
char *getpass (const char *prompt, uid_t id, int is_group,
void *pwd_or_group, void *hook)
{
- assert (! is_group && id == user);
+ assert_backtrace (! is_group && id == user);
return strdup (pw);
}
@@ -199,7 +199,7 @@ S_password_check_group (struct trivfs_protid *cred, uid_t group, char *pw,
char *getpass (const char *prompt, uid_t id, int is_group,
void *pwd_or_group, void *hook)
{
- assert (is_group && id == group);
+ assert_backtrace (is_group && id == group);
return strdup (pw);
}