From 994cfe894ccd6e0cc616237fa739bac18538da4e Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 20 Apr 2010 18:16:25 -0400 Subject: - a few cleanups - relicense to simple BSD --- LICENSE | 18 ------------------ configure.ac | 2 ++ src/pam_rps.c | 41 ++++++++++++----------------------------- 3 files changed, 14 insertions(+), 47 deletions(-) diff --git a/LICENSE b/LICENSE index bbfbfbb..593ebf6 100644 --- a/LICENSE +++ b/LICENSE @@ -10,21 +10,3 @@ are met: 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. diff --git a/configure.ac b/configure.ac index 35861ea..ba0d9b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,7 @@ AC_INIT(pam_rps,0.1) AM_INIT_AUTOMAKE(foreign) AC_PROG_LIBTOOL +AM_MAINTAINER_MODE AC_CHECK_HEADERS(security/pam_modules.h) +AC_CONFIG_HEADER(src/config.h) AC_OUTPUT(Makefile src/Makefile) diff --git a/src/pam_rps.c b/src/pam_rps.c index a68c0ab..5a225de 100644 --- a/src/pam_rps.c +++ b/src/pam_rps.c @@ -1,8 +1,5 @@ -/****************************************************************************** - * A truly challenge-response module for PAM. - * - * Copyright (c) 2003 Red Hat, Inc. - * Written by Nalin Dahyabhai +/* + * Copyright (c) 2003,2010 Red Hat, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -16,34 +13,20 @@ * 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. - * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include +#include #include #include #include #include #include -#include + #include #include #include @@ -91,9 +74,10 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) * Bleichenbacher's attack. */ r = c / 85; close(fd); - } - else /* Something is wrong with /dev/urandom */ + } else { + /* Something is wrong with /dev/urandom */ return PAM_CONV_ERR; + } } switch (r) { case 0: @@ -115,8 +99,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) } ret = pam_prompt(pamh, PAM_PROMPT_ECHO_OFF, &response, "%s: ", prompt_text); if (ret != PAM_SUCCESS) { - pam_syslog(pamh, LOG_CRIT, - "conversation error"); + pam_syslog(pamh, LOG_CRIT, "conversation error"); return PAM_CONV_ERR; } if ((response != NULL) && -- cgit