2 small authentication problems
Pascal A. Dupuis
dupuis at lei.ucl.ac.be
Tue Nov 24 10:18:57 GMT 1998
Hello,
I've had those annoyances with the new beta:
- in source/passdb/smbpass.c, you have :
/* Get smb uid. */
p++; /* Go past ':' */
if (!isdigit(*p)) {
DEBUG(0, ("getsmbfilepwent: malformed password entry (uid not
number)\n"));
continue;
}
I got stuck there by this entry :
nobody:-2:XXX...
The '-' made the test fail. I suggest to had a preliminary test, and
deliver a warning message ( uid should be positive, incorrect use of uid,
...), something like :
/* Get smb uid. */
p++; /* Go past ':' */
if ('-' == *p) {
DEBUG(0, "...")
continue;
}
if (!isdigit(*p)) {
DEBUG(0, "...")
continue;
}
uidval = atoi((char *) p);
/* Sanity check on uidval */
if (uidval < 0 ||uidval > MAX_UID) {
DEBUG(0, "...")
continue;
}
The second annoyance is that, when using smbclient, the USER value seems
to be set to nobody, though a USER environment variable exist.
Context : i686-pc-linux-glibc2, kernel 2.1.129 SMP, glibc-2.0.7-pre6,
gcc-2.8.1. How could I trace this one ?
Pascal A. Dupuis
--
feature, n: A surprising property of a program. Occasionaly documented.
To call a property a feature sometimes means the author did not consider
that case, and the program makes an unexpected, though not necessarily
wrong response. See BUG. "That's not a bug, it's a feature!" A bug can
be changed to a feature by documenting it.
More information about the samba
mailing list