- Timestamp:
- May 3, 2010, 1:20:42 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/oursrc/nss_nonlocal/nonlocal-shadow.c
r750 r1553 3 3 * shadow database for nss_nonlocal proxy. 4 4 * 5 * Copyright © 2007 Anders Kaseorg <andersk@mit.edu>5 * Copyright © 2007–2010 Anders Kaseorg <andersk@mit.edu> 6 6 * 7 * Permission is hereby granted, free of charge, to any person 8 * obtaining a copy of this software and associated documentation 9 * files (the "Software"), to deal in the Software without 10 * restriction, including without limitation the rights to use, copy, 11 * modify, merge, publish, distribute, sublicense, and/or sell copies 12 * of the Software, and to permit persons to whom the Software is 13 * furnished to do so, subject to the following conditions: 7 * This file is part of nss_nonlocal. 14 8 * 15 * The above copyright notice and this permission notice shall be 16 * included in all copies or substantial portions of the Software. 9 * nss_nonlocal is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public License 11 * as published by the Free Software Foundation; either version 2.1 of 12 * the License, or (at your option) any later version. 17 13 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 22 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 23 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 * SOFTWARE. 14 * nss_nonlocal is distributed in the hope that it will be useful, but 15 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with nss_nonlocal; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 * 02110-1301 USA 26 23 */ 27 24 … … 34 31 #include <dlfcn.h> 35 32 #include <stdio.h> 33 #include <syslog.h> 36 34 #include <errno.h> 37 35 #include <shadow.h> … … 180 178 break; 181 179 } while (__nss_next(&nip, fct_name, &fct.ptr, status, 0) == 0); 182 return status; 180 if (status != NSS_STATUS_SUCCESS) 181 return status; 182 183 if (strcmp(name, pwd->sp_namp) != 0) { 184 syslog(LOG_ERR, "nss_nonlocal: discarding shadow %s from lookup for shadow %s\n", pwd->sp_namp, name); 185 return NSS_STATUS_NOTFOUND; 186 } 187 188 return NSS_STATUS_SUCCESS; 183 189 }
Note: See TracChangeset
for help on using the changeset viewer.