$Log$
+ Revision 620.22 2004/04/23 17:27:50 ajc
+ * user_ops.c: do not attempt to save the loaded user record into the
+ supplied buffer, when the supplied buffer is NULL. (This calling
+ syntax is used to check for the existence of a user without storing it.)
+
Revision 620.21 2004/04/21 03:44:50 ajc
* serv_crypto.c: small fix to make self-signed certs no longer invalid
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
struct cdbdata *cdbus;
int using_sysuser = 0;
- memset(usbuf, 0, sizeof(struct ctdluser));
+ if (usbuf != NULL) {
+ memset(usbuf, 0, sizeof(struct ctdluser));
+ }
#ifdef ENABLE_AUTOLOGIN
if (CtdlAssociateSystemUser(sysuser_name, name) == 0) {
if (cdbus == NULL) { /* user not found */
return(1);
}
- memcpy(usbuf, cdbus->ptr,
+ if (usbuf != NULL) {
+ memcpy(usbuf, cdbus->ptr,
((cdbus->len > sizeof(struct ctdluser)) ?
sizeof(struct ctdluser) : cdbus->len));
+ }
cdb_free(cdbus);
return (0);