Lines Matching +full:open +full:- +full:circuit

2  * Copyright (c) 2001-2003,2009 Proofpoint, Inc. and its suppliers.
11 SM_RCSID("@(#)$Id: mbdb.c,v 1.43 2014-01-08 17:03:15 ca Exp $")
67 ** SM_MBDB_INITIALIZE -- specify which mailbox database to use
73 ** mbdb -- Which mailbox database to use.
99 namelen = arg - name;
103 for (t = SmMbdbTypes; t->mbdb_typename != NULL; ++t)
105 if (strlen(t->mbdb_typename) == namelen &&
106 strncmp(name, t->mbdb_typename, namelen) == 0)
109 if (t->mbdb_initialize != NULL)
110 err = t->mbdb_initialize(arg);
120 ** SM_MBDB_TERMINATE -- terminate connection to the mailbox database
123 ** are being held open for the connection to the mailbox database,
137 if (SmMbdbType->mbdb_terminate != NULL) in sm_mbdb_terminate()
138 SmMbdbType->mbdb_terminate(); in sm_mbdb_terminate()
142 ** SM_MBDB_LOOKUP -- look up a local mail recipient, given name
145 ** name -- name of local mail recipient
146 ** user -- pointer to structure to fill in on success
162 if (SmMbdbType->mbdb_lookup != NULL)
163 ret = SmMbdbType->mbdb_lookup(name, user);
168 ** SM_MBDB_FROMPW -- copy from struct pw to SM_MBDB_T
171 ** user -- destination user information structure
172 ** pw -- source passwd structure
184 (void) sm_strlcpy(user->mbdb_name, pw->pw_name,
185 sizeof(user->mbdb_name));
186 user->mbdb_uid = pw->pw_uid;
187 user->mbdb_gid = pw->pw_gid;
188 sm_pwfullname(pw->pw_gecos, pw->pw_name, user->mbdb_fullname,
189 sizeof(user->mbdb_fullname));
190 (void) sm_strlcpy(user->mbdb_homedir, pw->pw_dir,
191 sizeof(user->mbdb_homedir));
192 (void) sm_strlcpy(user->mbdb_shell, pw->pw_shell,
193 sizeof(user->mbdb_shell));
197 ** SM_PWFULLNAME -- build full name of user from pw_gecos field.
203 ** gecos -- name to build.
204 ** user -- the login name of this user (for &).
205 ** buf -- place to put the result.
206 ** buflen -- length of buf.
242 if (bp >= &buf[buflen - 1])
244 /* buffer overflow -- just use login name */
251 (void) sm_strlcpy(bp, user, buflen - (bp - buf));
259 *bp++ = Latin1ToASCII[(unsigned char) *p - 128];
274 ** MBDB_PW_INITIALIZE -- initialize getpwnam() version
277 ** arg -- unused.
292 ** MBDB_PW_LOOKUP -- look up a local mail recipient, given name
295 ** name -- name of local mail recipient
296 ** user -- pointer to structure to fill in on success
311 /* DEC Hesiod getpwnam accepts numeric strings -- short circuit it */
330 ** user unknown <-> getpwnam() == NULL && errno == 0
345 ** MBDB_PW_TERMINATE -- terminate connection to the mailbox database
368 ** EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
373 ** EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )
379 ** SYNTAX 'IA5String' SINGLE-VALUE )
384 ** SYNTAX 'IA5String' SINGLE-VALUE )
389 ** SYNTAX 'IA5String' SINGLE-VALUE )
413 ** MBDB_LDAP_INITIALIZE -- initialize LDAP version
416 ** arg -- LDAP specification
459 ** MBDB_LDAP_LOOKUP -- look up a local mail recipient, given name
462 ** name -- name of local mail recipient
463 ** user -- pointer to structure to fill in on success
489 if (strlen(name) >= sizeof(user->mbdb_name))
504 /* re-open map in this child process */
510 /* map not open, try to open now */
517 if (msgid == -1)
585 LDAPLMAP.ldap_ld->ld_errno = LDAP_SUCCESS;
619 LDAPLMAP.ldap_ld->ld_errno = LDAP_SUCCESS;
628 strlen(vals[0]) >= sizeof(user->mbdb_fullname))
631 sm_pwfullname(vals[0], name, user->mbdb_fullname,
632 sizeof(user->mbdb_fullname));
638 strlen(vals[0]) >= sizeof(user->mbdb_homedir))
641 (void) sm_strlcpy(user->mbdb_homedir, vals[0],
642 sizeof(user->mbdb_homedir));
648 strlen(vals[0]) >= sizeof(user->mbdb_shell))
651 (void) sm_strlcpy(user->mbdb_shell, vals[0],
652 sizeof(user->mbdb_shell));
665 if (p == vals[0] && *p == '-')
667 /* but not simply '-' */
674 user->mbdb_uid = atoi(vals[0]);
687 if (p == vals[0] && *p == '-')
689 /* but not simply '-' */
696 user->mbdb_gid = atoi(vals[0]);
713 ** http://www.openldap.org/lists/openldap-devel/9901/msg00064.html
741 (void) sm_strlcpy(user->mbdb_name, name,
742 sizeof(user->mbdb_name));
756 ** MBDB_LDAP_TERMINATE -- terminate connection to the mailbox database