@@ -1104,6 +1104,28 @@ int otp_user_add(struct otp_ctx *otpctx, char *u_username,
/*
* sanity checks
*/
+
+ if (!u_username) {
+ if (otpctx->verbose)
+ xerr_warnx("u_username is null.");
+ goto otp_user_add_out;
+ }
+
+ if (!u_key_val) {
+ if (otpctx->verbose)
+ xerr_warnx("u_key_val is null.");
+ goto otp_user_add_out;
+ }
+
+ /* u_loc can be null */
+ if (u_loc) {
+ if (strlen(u_loc) > OTP_USER_LOC_LEN) {
+ if (otpctx->verbose)
+ xerr_warnx("strlen(u_loc) > OTP_USER_LOC_LEN.");
+ goto otp_user_add_out;
+ }
+ }
+
if (ou.db_key.size > OTP_USER_NAME_LEN) {
if (otpctx->verbose)
xerr_warnx("strlen(u_username) > OTP_USER_NAME_LEN.");
@@ -1116,19 +1138,14 @@ int otp_user_add(struct otp_ctx *otpctx, char *u_username,
goto otp_user_add_out;
}
- if (strlen(u_loc) > OTP_USER_LOC_LEN) {
- if (otpctx->verbose)
- xerr_warnx("strlen(u_loc) > OTP_USER_LOC_LEN.");
- goto otp_user_add_out;
- }
-
/*
* copy in user fields to ou
*/
/* lengths checked above */
strncpy(ou.username, u_username, OTP_USER_NAME_LEN);
- strncpy(ou.loc, u_loc, OTP_USER_LOC_LEN);
+ if (u_loc)
+ strncpy(ou.loc, u_loc, OTP_USER_LOC_LEN);
bcopy(u_key_val, &ou.key, u_key_size);
ou.key_size = u_key_size;
ou.count = u_count;
diff --git a/doc/CHANGES b/doc/CHANGES
index 8e0bffc..f54d0b3 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -1,5 +1,13 @@
# $Id:$
+htsoft-downloader: Makefile install target fix - eshicks
+
+pam_otp: allown_unknown typo - eshicks
+
+otplib: more sanity checking on otp_user_add - eshicks
+
+otp-tokend: smtp support, fork() on message
+
urd/rc.d/urd: updated for new flags
otp-control: mode generate will honor -c
diff --git a/doc/Makefile b/doc/Makefile
index 8af1619..187d131 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 153 2011-04-01 02:38:36Z maf $
+# $Id: Makefile 196 2011-06-12 18:57:25Z maf $
INSTALL=install -c -m0644
@@ -19,12 +19,13 @@ MISCDIR=/usr/local/ootp/doc
openjade -V nochunks -c /usr/local/share/sgml/docbook/dsssl/modular/catalog -c /usr/local/share/sgml/docbook/3.1/dtd/catalog -c /usr/local/share/sgml/jade/catalog -d /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl -t sgml $*.sgml > $*.html
MAN1S = htsoft-downloader.1 bcload.1 otp-control.1 otp-ov-plugin.1\
- pam_otp.1 urd.1 otp-sca.1 otp-sct.1
+ pam_otp.1 urd.1 otp-sca.1 otp-sct.1 otp-tokend.1
MAN7S = spyrus-par2.7
HTMLS = htsoft-downloader.html bcload.html otp-control.html otp-ov-plugin.html\
- pam_otp.html urd.html otp-sca.html otp-sct.html spyrus-par2.html
+ pam_otp.html urd.html otp-sca.html otp-sct.html spyrus-par2.html\
+ otp-tokend.html
MISC = QUICKSTART LICENSE PAR2-USER-GENERIC BALANCE-USER HOTP-2009.pdf
diff --git a/doc/TODO b/doc/TODO
index ca05765..79f19d0 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,14 +1,15 @@
-urd option c should not require arg
-urd_oareng_pgm support in rc.d
+sshd[41599]: v2 format has 11 fields, not 10.
+sshd[41599]: otp_ou_fromascii(): failed.
+sshd[41599]: otp_urec_open(maf): failed.
+sshd[41599]: ffdb_rec_close(): rec_open_ref_count != 0.
+sshd[41599]: otp_db_close(): failed.
+
+OpenOTP patch: fix for weird balance reader
+
urd opt n should include character list
man page for option n
-tokend
- man page
- usage
-
-urd,openvpn
- send-token
+document send-token option
Enter PIN code does not issue a \n
@@ -19,8 +20,6 @@ RADIUS proxy support
get documentation for the ACS balance reader
ACS balance reader support dec31.6?
-break out htsoft-downloader, urd, bcload?
-
full coverage testing for otplib and ffdb
otp-token (soft token)
@@ -50,5 +49,3 @@ otp-sca
urd - wtmp
-otp-control -c should do the right thing when generating otp
-
diff --git a/doc/bcload.1 b/doc/bcload.1
index 26757da..65af2a6 100644
--- a/doc/bcload.1
+++ b/doc/bcload.1
@@ -136,4 +136,4 @@ Mark Fullmer maf@splintered\&.net
\fBotp-ov-plugin\fP(1)
\fBurd\fP(1)
spyrus-par2(7)
-...\" created by instant / docbook-to-man, Sun 15 May 2011, 23:57
+...\" created by instant / docbook-to-man, Sun 12 Jun 2011, 15:01
diff --git a/doc/htsoft-downloader.1 b/doc/htsoft-downloader.1
index e347875..052e738 100644
--- a/doc/htsoft-downloader.1
+++ b/doc/htsoft-downloader.1
@@ -124,7 +124,11 @@ Mark Fullmer maf@splintered\&.net
.PP
Intel Hexadecimal Object File Format Specification Rev A
.PP
-www\&.htsoft\&.com
+http://www\&.htsoft\&.com
+.PP
+http://www\&.microchip\&.com
.PP
http://www\&.ehl\&.cz/pic/pic_e\&.htm
-...\" created by instant / docbook-to-man, Sun 15 May 2011, 23:57
+.PP
+ftp://ftp\&.htsoft\&.com/hitech/samples/bootldr\&.zip
+...\" created by instant / docbook-to-man, Sun 12 Jun 2011, 15:01
diff --git a/doc/htsoft-downloader.html b/doc/htsoft-downloader.html
index e7deba2..186fc76 100644
--- a/doc/htsoft-downloader.html
+++ b/doc/htsoft-downloader.html
@@ -260,9 +260,13 @@ NAME="AEN83"
>Intel Hexadecimal Object File Format Specification Rev A
www.htsoft.com
http://www.htsoft.com