aboutsummaryrefslogtreecommitdiff
path: root/src/anubisadm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anubisadm.c')
-rw-r--r--src/anubisadm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/anubisadm.c b/src/anubisadm.c
index 1eff9cb..4d730d9 100644
--- a/src/anubisadm.c
+++ b/src/anubisadm.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNU Anubis 2 This file is part of GNU Anubis
3 Copyright (C) 2004-2014 The Anubis Team. 3 Copyright (C) 2004-2024 The Anubis Team.
4 4
5 GNU Anubis is free software; you can redistribute it and/or modify it 5 GNU Anubis is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the 6 under the terms of the GNU General Public License as published by the
@@ -36,7 +36,7 @@ error (const char *fmt, ...)
36} 36}
37 37
38void 38void
39xalloc_die () 39xnomem (void)
40{ 40{
41 error ("%s", _("Not enough memory")); 41 error ("%s", _("Not enough memory"));
42 exit (1); 42 exit (1);
@@ -89,7 +89,7 @@ op_create (int argc, char **argv)
89 return 1; 89 return 1;
90 90
91 memset (&rec, 0, sizeof (rec)); 91 memset (&rec, 0, sizeof (rec));
92 while (getline (&buf, &n, stdin) > 0 && n > 0) 92 while (xgetline (&buf, &n, stdin) > 0 && n > 0)
93 { 93 {
94 char *p; 94 char *p;
95 int len = strlen (buf); 95 int len = strlen (buf);
@@ -242,13 +242,13 @@ op_add_or_modify (char *database, int code, char *errmsg)
242 return 1; 242 return 1;
243 } 243 }
244 if (!password) 244 if (!password)
245 password = getpass (_("Password:"));
246 if (!password)
247 { 245 {
248 error (_("password not specified")); 246 if (anubis_getpass (_("Password: "), &password))
249 return 1; 247 {
248 error (_("password not specified"));
249 return 1;
250 }
250 } 251 }
251
252 rc = anubis_db_open (database, anubis_db_rdwr, &db, &err); 252 rc = anubis_db_open (database, anubis_db_rdwr, &db, &err);
253 253
254 if (rc != ANUBIS_DB_SUCCESS) 254 if (rc != ANUBIS_DB_SUCCESS)
@@ -353,7 +353,7 @@ main (int argc, char **argv)
353 353
354 dbtext_init (); 354 dbtext_init ();
355# ifdef HAVE_LIBGDBM 355# ifdef HAVE_LIBGDBM
356 gdbm_db_init (); 356 db_gdbm_init ();
357# endif 357# endif
358# ifdef WITH_MYSQL 358# ifdef WITH_MYSQL
359 mysql_db_init (); 359 mysql_db_init ();

Return to:

Send suggestions and report system problems to the System administrator.