Gentoo Archives: gentoo-commits

From: "Naohiro Aota (naota)" <naota@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-auth/openpam/files: openpam-20130907-nbsd.patch openpam-20130907-module-dir.patch openpam-20130907-gentoo.patch
Date: Sat, 30 Nov 2013 13:36:29
Message-Id: 20131130133625.B46DE2004B@flycatcher.gentoo.org
1 naota 13/11/30 13:36:25
2
3 Added: openpam-20130907-nbsd.patch
4 openpam-20130907-module-dir.patch
5 openpam-20130907-gentoo.patch
6 Log:
7 Version bump. patch written by Yuta SATOH <nigoro.gentoo@×××××.com>. #492616
8
9 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key F8551514)
10
11 Revision Changes Path
12 1.1 sys-auth/openpam/files/openpam-20130907-nbsd.patch
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/openpam/files/openpam-20130907-nbsd.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/openpam/files/openpam-20130907-nbsd.patch?rev=1.1&content-type=text/plain
16
17 Index: openpam-20130907-nbsd.patch
18 ===================================================================
19 --- openpam-20050201.orig/lib/libpam/pam_debug_log.c 2006-02-18 01:15:39.000000000 -0200
20 +++ openpam-20050201/lib/libpam/pam_debug_log.c 2006-02-18 01:16:30.000000000 -0200
21 @@ -47,7 +47,8 @@
22 const char *file, const char *function, const char *format, ...)
23 {
24 va_list ap;
25 - char *fmtbuf, *modname, *period;
26 + char *fmtbuf;
27 + const char *modname, *period;
28
29 if (!(flags & PAM_SILENT) && !openpam_get_option(pamh, "no_warn")) {
30 modname = basename(file);
31
32
33
34 1.1 sys-auth/openpam/files/openpam-20130907-module-dir.patch
35
36 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/openpam/files/openpam-20130907-module-dir.patch?rev=1.1&view=markup
37 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/openpam/files/openpam-20130907-module-dir.patch?rev=1.1&content-type=text/plain
38
39 Index: openpam-20130907-module-dir.patch
40 ===================================================================
41 diff --git a/openpam-20130907/lib/libpam/openpam_constants.c b/openpam-20130907/lib/libpam/openpam_constants.c
42 index 1cdd810..f66e469 100644
43 --- a/openpam-20130907/lib/libpam/openpam_constants.c
44 +++ b/openpam-20130907/lib/libpam/openpam_constants.c
45 @@ -135,8 +135,8 @@ const char *openpam_policy_path[] = {
46 };
47
48 const char *openpam_module_path[] = {
49 -#ifdef OPENPAM_MODULES_DIRECTORY
50 - OPENPAM_MODULES_DIRECTORY,
51 +#ifdef OPENPAM_MODULES_DIR
52 + OPENPAM_MODULES_DIR,
53 #else
54 "/usr/lib",
55 "/usr/local/lib",
56
57
58
59 1.1 sys-auth/openpam/files/openpam-20130907-gentoo.patch
60
61 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/openpam/files/openpam-20130907-gentoo.patch?rev=1.1&view=markup
62 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/openpam/files/openpam-20130907-gentoo.patch?rev=1.1&content-type=text/plain
63
64 Index: openpam-20130907-gentoo.patch
65 ===================================================================
66 diff -Nur openpam-20130907.orig/include/security/Makefile.am openpam-20130907/include/security/Makefile.am
67 --- openpam-20130907.orig/include/security/Makefile.am 2013-09-07 22:28:00.000000000 +0900
68 +++ openpam-20130907/include/security/Makefile.am 2013-11-26 23:24:54.000000000 +0900
69 @@ -9,4 +9,5 @@
70 pam_appl.h \
71 pam_constants.h \
72 pam_modules.h \
73 - pam_types.h
74 + pam_types.h \
75 + pam_mod_misc.h
76 diff -Nur openpam-20130907.orig/include/security/pam_mod_misc.h openpam-20130907/include/security/pam_mod_misc.h
77 --- openpam-20130907.orig/include/security/pam_mod_misc.h 1970-01-01 09:00:00.000000000 +0900
78 +++ openpam-20130907/include/security/pam_mod_misc.h 2013-11-26 23:24:54.000000000 +0900
79 @@ -0,0 +1,56 @@
80 +/*-
81 + * Copyright 1998 Juniper Networks, Inc.
82 + * All rights reserved.
83 + *
84 + * Redistribution and use in source and binary forms, with or without
85 + * modification, are permitted provided that the following conditions
86 + * are met:
87 + * 1. Redistributions of source code must retain the above copyright
88 + * notice, this list of conditions and the following disclaimer.
89 + * 2. Redistributions in binary form must reproduce the above copyright
90 + * notice, this list of conditions and the following disclaimer in the
91 + * documentation and/or other materials provided with the distribution.
92 + *
93 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
94 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
95 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
96 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
97 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
98 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
99 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
100 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
101 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
102 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
103 + * SUCH DAMAGE.
104 + *
105 + * $FreeBSD: src/lib/libpam/libpam/security/pam_mod_misc.h,v 1.12 2003/05/31 16:56:35 des Exp $
106 + */
107 +
108 +#ifndef PAM_MOD_MISC_H
109 +#define PAM_MOD_MISC_H
110 +
111 +#include <sys/cdefs.h>
112 +
113 +/*
114 + * Common option names
115 + */
116 +#define PAM_OPT_NULLOK "nullok"
117 +#define PAM_OPT_AUTH_AS_SELF "auth_as_self"
118 +#define PAM_OPT_ECHO_PASS "echo_pass"
119 +#define PAM_OPT_DEBUG "debug"
120 +
121 +__BEGIN_DECLS
122 +void _pam_verbose_error(pam_handle_t *, int, const char *,
123 + const char *, const char *, ...);
124 +__END_DECLS
125 +
126 +#define PAM_LOG(...) \
127 + openpam_log(PAM_LOG_DEBUG, __VA_ARGS__)
128 +
129 +#define PAM_RETURN(arg) \
130 + return (arg)
131 +
132 +#define PAM_VERBOSE_ERROR(...) \
133 + _pam_verbose_error(pamh, flags, __FILE__, __FUNCTION__, __VA_ARGS__)
134 +
135 +#endif
136 diff -Nur openpam-20130907.orig/lib/libpam/Makefile.am openpam-20130907/lib/libpam/Makefile.am
137 --- openpam-20130907.orig/lib/libpam/Makefile.am 2013-09-07 22:28:00.000000000 +0900
138 +++ openpam-20130907/lib/libpam/Makefile.am 2013-11-26 23:25:33.000000000 +0900
139 @@ -75,6 +75,7 @@
140 pam_verror.c \
141 pam_vinfo.c \
142 pam_vprompt.c \
143 + pam_debug_log.c \
144 $(NULL)
145
146 libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@
147 diff -Nur openpam-20130907.orig/lib/libpam/pam_debug_log.c openpam-20130907/lib/libpam/pam_debug_log.c
148 --- openpam-20130907.orig/lib/libpam/pam_debug_log.c 1970-01-01 09:00:00.000000000 +0900
149 +++ openpam-20130907/lib/libpam/pam_debug_log.c 2013-11-26 23:24:54.000000000 +0900
150 @@ -0,0 +1,64 @@
151 +/*-
152 + * Copyright 2001 Mark R V Murray
153 + * All rights reserved.
154 + *
155 + * Redistribution and use in source and binary forms, with or without
156 + * modification, are permitted provided that the following conditions
157 + * are met:
158 + * 1. Redistributions of source code must retain the above copyright
159 + * notice, this list of conditions and the following disclaimer.
160 + * 2. Redistributions in binary form must reproduce the above copyright
161 + * notice, this list of conditions and the following disclaimer in the
162 + * documentation and/or other materials provided with the distribution.
163 + *
164 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
165 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
166 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
167 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
168 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
169 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
170 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
171 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
172 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
173 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
174 + * SUCH DAMAGE.
175 + */
176 +
177 +#include <sys/cdefs.h>
178 +
179 +#ifndef __GLIBC__
180 +#include <libgen.h>
181 +#endif
182 +
183 +#include <stdarg.h>
184 +#include <stdio.h>
185 +#include <stdlib.h>
186 +#include <string.h>
187 +
188 +#include <security/pam_appl.h>
189 +#include <security/openpam.h>
190 +#include <security/pam_mod_misc.h>
191 +
192 +/* Print a verbose error, including the function name and a
193 + * cleaned up filename.
194 + */
195 +void
196 +_pam_verbose_error(pam_handle_t *pamh, int flags,
197 + const char *file, const char *function, const char *format, ...)
198 +{
199 + va_list ap;
200 + char *fmtbuf, *modname, *period;
201 +
202 + if (!(flags & PAM_SILENT) && !openpam_get_option(pamh, "no_warn")) {
203 + modname = basename(file);
204 + period = strchr(modname, '.');
205 + if (period == NULL)
206 + period = strchr(modname, '\0');
207 + va_start(ap, format);
208 + asprintf(&fmtbuf, "%.*s: %s: %s\n", (int)(period - modname),
209 + modname, function, format);
210 + pam_verror(pamh, fmtbuf, ap);
211 + free(fmtbuf);
212 + va_end(ap);
213 + }
214 +}