udb.c (110560) | udb.c (120256) |
---|---|
1/* | 1/* |
2 * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. | 2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. |
3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#include <sendmail.h> 15 16#if USERDB | 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#include <sendmail.h> 15 16#if USERDB |
17SM_RCSID("@(#)$Id: udb.c,v 8.153.4.4 2002/12/03 17:57:41 gshapiro Exp $ (with USERDB)") | 17SM_RCSID("@(#)$Id: udb.c,v 8.153.4.5 2003/04/03 16:31:00 ca Exp $ (with USERDB)") |
18#else /* USERDB */ | 18#else /* USERDB */ |
19SM_RCSID("@(#)$Id: udb.c,v 8.153.4.4 2002/12/03 17:57:41 gshapiro Exp $ (without USERDB)") | 19SM_RCSID("@(#)$Id: udb.c,v 8.153.4.5 2003/04/03 16:31:00 ca Exp $ (without USERDB)") |
20#endif /* USERDB */ 21 22#if USERDB 23 24# if NEWDB 25# include "sm/bdb.h" 26# else /* NEWDB */ 27# define DBT struct _data_base_thang_ --- 143 unchanged lines hidden (view full) --- 171 172 /* if name begins with a colon, it indicates our metadata */ 173 if (user[0] == ':') 174 return EX_OK; 175 176 keylen = sm_strlcpyn(keybuf, sizeof keybuf, 2, user, ":maildrop"); 177 178 /* if name is too long, assume it won't match */ | 20#endif /* USERDB */ 21 22#if USERDB 23 24# if NEWDB 25# include "sm/bdb.h" 26# else /* NEWDB */ 27# define DBT struct _data_base_thang_ --- 143 unchanged lines hidden (view full) --- 171 172 /* if name begins with a colon, it indicates our metadata */ 173 if (user[0] == ':') 174 return EX_OK; 175 176 keylen = sm_strlcpyn(keybuf, sizeof keybuf, 2, user, ":maildrop"); 177 178 /* if name is too long, assume it won't match */ |
179 if (keylen > sizeof keybuf) | 179 if (keylen >= sizeof keybuf) |
180 return EX_OK; 181 182 /* build actual database key */ 183 184 breakout = false; 185 for (up = UdbEnts; !breakout; up++) 186 { 187 int usersize; --- 1125 unchanged lines hidden --- | 180 return EX_OK; 181 182 /* build actual database key */ 183 184 breakout = false; 185 for (up = UdbEnts; !breakout; up++) 186 { 187 int usersize; --- 1125 unchanged lines hidden --- |