summaryrefslogtreecommitdiff
path: root/libpam/pam_misc.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2006-06-14 11:41:47 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2006-06-14 11:41:47 +0000
commit1b8c3c439aca2b3849328666a0d022c1685b7bdf (patch)
tree46ff54f2f66d5b7a5cccbae209940f49dd5e2745 /libpam/pam_misc.c
parent7c4418f0d3ed9388713bee5ec7aff54a02a9796c (diff)
Relevant BUGIDs:
Purpose of commit: cleanup Commit summary: --------------- 2006-06-14 Thorsten Kukuk <kukuk@thkukuk.de> * libpam/pam_handlers.c (extract_modulename): Use _pam_strdup instead of strdup. * libpam/pam_private.h: Remove _pam_strCMP. * libpam/pam_misc.c: Likewise. * libpam/pam_handlers.c: Replaced _pam_strCMP with strcasecmp.
Diffstat (limited to 'libpam/pam_misc.c')
-rw-r--r--libpam/pam_misc.c52
1 files changed, 35 insertions, 17 deletions
diff --git a/libpam/pam_misc.c b/libpam/pam_misc.c
index 26590d09..78e317f7 100644
--- a/libpam/pam_misc.c
+++ b/libpam/pam_misc.c
@@ -1,7 +1,38 @@
-/* pam_misc.c -- This is random stuff */
-
-/*
- * $Id$
+/* pam_misc.c -- This is random stuff
+ *
+ * Copyright (c) Andrew G. Morgan <morgan@kernel.org> 2000-2003
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, and the entire permission notice in its entirety,
+ * including the disclaimer of warranties.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * ALTERNATIVELY, this product may be distributed under the terms of
+ * the GNU Public License, in which case the provisions of the GPL are
+ * required INSTEAD OF the above restrictions. (This clause is
+ * necessary due to a potential bad interaction between the GPL and
+ * the restrictions contained in a BSD-style copyright.)
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "pam_private.h"
@@ -13,19 +44,6 @@
#include <syslog.h>
#include <ctype.h>
-/* caseless string comparison: POSIX does not define this.. */
-int _pam_strCMP(const char *s, const char *t)
-{
- int cf;
-
- do {
- cf = tolower(*s) - tolower(*t);
- ++t;
- } while (!cf && *s++);
-
- return cf;
-}
-
char *_pam_StrTok(char *from, const char *format, char **next)
/*
* this function is a variant of the standard strtok, it differs in that