Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-07-25 00:22:07 UTC
Modified files:
ChangeLog ircd/umkpasswd.c
Log message:
Stop umkpasswd from dumping core on bad argument lists.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.809 ircu2.10/ChangeLog:1.810
--- ircu2.10/ChangeLog:1.809 Mon Jul 24 17:17:30 2006
+++ ircu2.10/ChangeLog Mon Jul 24 17:21:57 2006
@@ -1,5 +1,11 @@
2006-07-24 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/umkpasswd.c (parse_arguments): Exit rather than abort when
+ encountering an invalid argument.
+ (main): Exit rather than abort when not given a mechanism.
+
+2006-07-24 Michael Poole <[EMAIL PROTECTED]>
+
* include/motd.h (motd_init): Split into two functions.
* ircd/ircd_features.c (FEAT_NOINIT): Delete.
Index: ircu2.10/ircd/umkpasswd.c
diff -u ircu2.10/ircd/umkpasswd.c:1.12 ircu2.10/ircd/umkpasswd.c:1.13
--- ircu2.10/ircd/umkpasswd.c:1.12 Sun Jul 23 11:04:22 2006
+++ ircu2.10/ircd/umkpasswd.c Mon Jul 24 17:21:57 2006
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: umkpasswd.c,v 1.12 2006/07/23 18:04:22 entrope Exp $
+ * $Id: umkpasswd.c,v 1.13 2006/07/25 00:21:57 entrope Exp $
*/
#include "config.h"
#include <unistd.h>
@@ -360,7 +360,7 @@
if(umkpasswd_conf->flags & ACT_ADDOPER)
{
fprintf(stderr, "-a and -u are mutually exclusive. Use either or
neither.\n");
- abort(); /* b0rk b0rk b0rk */
+ exit(1); /* b0rk b0rk b0rk */
}
umkpasswd_conf->flags |= ACT_UPDOPER;
@@ -391,7 +391,7 @@
if(umkpasswd_conf->flags & ACT_UPDOPER)
{
fprintf(stderr, "-a and -u are mutually exclusive. Use either or
neither.\n");
- abort(); /* b0rk b0rk b0rk */
+ exit(1); /* b0rk b0rk b0rk */
}
umkpasswd_conf->flags |= ACT_ADDOPER;
@@ -401,7 +401,7 @@
default:
/* unknown option - spit out syntax and b0rk */
show_help();
- abort();
+ exit(1); /* b0rk b0rk b0rk */
break;
}
}
@@ -449,7 +449,7 @@
if (NULL == umkpasswd_conf->mech)
{
fprintf(stderr, "No mechanism specified.\n");
- abort();
+ exit(1);
}
if (NULL == pw)
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches