• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂855d9dec7274665e70d2b4919b496e5bc1d07436 (tree)
時間2012-03-20 12:39:27
作者matsuand <matsuand@user...>
Commitermatsuand

Log Message

Merge branch 'master' of git.pf.sourceforge.jp:/gitroot/m/ma/matsuand/LFScripts

Change Summary

差異

--- a/BLFS/Xorg/mesalib.sh
+++ b/BLFS/Xorg/mesalib.sh
@@ -1,6 +1,6 @@
11 #!/bin/sh
22
3-VER=7.11.2
3+VER=8.0.1
44 TARGET=MesaLib-$VER
55 TARGETBALL=$TARGET.tar.bz2
66 TARGETDIR=Mesa-$VER
@@ -31,8 +31,10 @@ cd $TARGETDIR
3131 sed 's@FLAGS=\"-g@FLAGS=\"@' -i configure
3232
3333 echo \ \ Patching...
34-patch -Np1 -i $DLD/MesaLib-$VER-llvm_3.0-1.patch \
35- 1> $LOG/$TARGET.0_patch.log 2>&1 || exit 1
34+#patch -Np1 -i $DLD/MesaLib-$VER-llvm_3.0-1.patch \
35+# 1> $LOG/$TARGET.0_patch.log 2>&1 || exit 1
36+#patch -Np1 -i $DLD/MesaLib-$VER-add_xdemos-2.patch \
37+# 1>> $LOG/$TARGET.0_patch.log 2>&1 || exit 1
3638 patch -Np1 -i $DLD/MesaLib-$VER-add_xdemos-2.patch \
3739 1>> $LOG/$TARGET.0_patch.log 2>&1 || exit 1
3840
--- a/BLFS/cacerts.sh
+++ b/BLFS/cacerts.sh
@@ -247,6 +247,7 @@ certdir='/mozilla/source/security/nss/lib/ckfw/builtins'
247247 url="$certhost$certdir/certdata.txt?raw=1"
248248
249249 wget --output-document certdata.txt $url
250+#cp -p $DLD/certdata.txt .
250251 unset certhost certdir url
251252 make-ca.sh
252253 remove-expired-certs.sh certs
--- a/BLFS/cyrus-sasl.sh
+++ b/BLFS/cyrus-sasl.sh
@@ -36,8 +36,8 @@ rm -fr $TARGETDIR
3636 cd $TARGETDIR
3737
3838 echo \ \ Patching unofficial...
39-#patch -Np1 -i $WRK/patch/cyrus-sasl-$VER.patch
40-patch -Np1 -i $WRK/patch/cyrus-sasl-2.1.23.patch
39+#patch -Np1 -i $WRK/patch/cyrus-sasl-2.1.23.patch
40+patch -Np1 -i $WRK/patch/cyrus-sasl-2.1.25.patch
4141
4242 sed -i.bak 's/#elif WITH_DES/#elif defined(WITH_DES)/' \
4343 plugins/digestmd5.c
--- a/BLFS/git.sh
+++ b/BLFS/git.sh
@@ -2,7 +2,7 @@
22
33 . ./_blfsset.sh
44
5-VER=1.7.9.3
5+VER=1.7.9.4
66 TARGET=git-$VER
77 TARGETBALL=$TARGET.tar.gz
88 TARGETDIR=$TARGET
--- a/BLFS/gnutls.sh
+++ b/BLFS/gnutls.sh
@@ -2,7 +2,7 @@
22
33 . ./_blfsset.sh
44
5-VER=3.0.15
5+VER=3.0.17
66 TARGET=gnutls-$VER
77 TARGETBALL=$TARGET.tar.xz
88 TARGETDIR=$TARGET
--- /dev/null
+++ b/BLFS/install-cups.sh
@@ -0,0 +1,23 @@
1+#!/bin/sh
2+
3+. ./_blfsset.sh
4+
5+TARGET=blfs-bootscripts-$BOOTSCRIPTDATE
6+SCRIPT=install-cups
7+TARGETBALL=$TARGET.tar.bz2
8+TARGETDIR=$TARGET
9+
10+cd $SRC
11+
12+echo \ \ Removing old directory...
13+rm -fr $TARGETDIR
14+
15+. $WRK/_extract.sh
16+
17+cd $TARGETDIR
18+
19+paco -p "$SCRIPT" "make $SCRIPT" \
20+ 1> $LOG/$TARGET.1_install.log 2>&1 || exit 1
21+
22+echo -n \ \ Pacoing:\ && paco -a1 | grep "$SCRIPT" || echo none
23+
--- a/BLFS/jdk-x86.sh
+++ b/BLFS/jdk-x86.sh
@@ -10,12 +10,7 @@ TARGETBALL=jdk-$UVER-linux-i586.tar.gz
1010
1111 cd $SRC
1212
13-echo Extracting...
14-if ! test -f $DLD/$TARGETBALL; then
15- echo \ \ Tarball not found: $TARGETBALL && exit 1
16-else
17- tar xf $DLD/$TARGETBALL
18-fi
13+. $WRK/_extract.sh
1914
2015 cd $TARGETDIR
2116
--- /dev/null
+++ b/BLFS/krb5.sh
@@ -0,0 +1,94 @@
1+#!/bin/sh
2+
3+. ./_blfsset.sh
4+
5+VER=1.10
6+TARGET=krb5-$VER
7+TARGETBALL=$TARGET.tar.gz
8+TARGETDIR=$TARGET
9+
10+echo Check Required...
11+./_checkOptions.sh keyutils openldap dejagnu ntp || exit 1
12+if test "$1" == "check"; then
13+ exit 0
14+fi
15+
16+cd $SRC
17+
18+echo $TARGET
19+
20+echo \ \ Removing old directory...
21+rm -fr $TARGETDIR
22+
23+. $WRK/_extract.sh
24+
25+cd $TARGETDIR
26+
27+echo \ \ Configuring...
28+cd src
29+./configure CPPFLAGS="-I/usr/include/et -I/usr/include/ss" \
30+ --prefix=/usr \
31+ --localstatedir=/var/lib \
32+ --with-system-et \
33+ --with-system-ss \
34+ --enable-dns-for-realm \
35+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
36+
37+echo \ \ Making...
38+make \
39+ 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1
40+
41+echo \ \ Installing...
42+paco -p $TARGET "make install" \
43+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
44+
45+paco -p+ $TARGET "\
46+mv -v /usr/bin/ksu /bin" \
47+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
48+
49+chmod -v 755 /bin/ksu
50+paco -p+ $TARGET "\
51+mv -v /usr/lib/libkrb5.so.3* /lib" \
52+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
53+
54+paco -p+ $TARGET "\
55+mv -v /usr/lib/libk5crypto.so.3* /lib" \
56+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
57+
58+paco -p+ $TARGET "\
59+mv -v /usr/lib/libkrb5support.so.0* /lib" \
60+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
61+
62+paco -p+ $TARGET "\
63+ln -v -sf ../../lib/libkrb5.so.3.3 /usr/lib/libkrb5.so" \
64+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
65+paco -p+ $TARGET "\
66+ln -v -sf ../../lib/libk5crypto.so.3.1 /usr/lib/libk5crypto.so" \
67+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
68+paco -p+ $TARGET "\
69+ln -v -sf ../../lib/libkrb5support.so.0.1 /usr/lib/libkrb5support.so" \
70+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
71+
72+paco -p+ $TARGET "\
73+install -m644 -v ../doc/*.info /usr/share/info" \
74+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
75+
76+for INFOFILE in 5-admin 5-install 5-user; do
77+ paco -p+ $TARGET "\
78+ install-info --info-dir=/usr/share/info \
79+ /usr/share/info/krb$INFOFILE.info" \
80+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
81+ rm ../doc/krb$INFOFILE.info
82+done
83+
84+install -m755 -v -d /usr/share/doc/krb5-$VER
85+
86+paco -p+ $TARGET "\
87+cp -Rv ../doc/* /usr/share/doc/krb5-$VER" \
88+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
89+
90+echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none
91+
92+echo \ \ Removing directory...
93+cd ../.. && rm -fr $TARGETDIR
94+
--- /dev/null
+++ b/BLFS/libassuan.sh
@@ -0,0 +1,44 @@
1+#!/bin/sh
2+
3+VER=2.0.1
4+TARGET=libassuan-$VER
5+TARGETBALL=$TARGET.tar.bz2
6+TARGETDIR=$TARGET
7+
8+. ./_blfsset.sh
9+
10+echo Check Required...
11+./_checkRequired.sh pth || exit 1
12+
13+cd $SRC
14+
15+echo $TARGET
16+
17+echo \ \ Removing old directory...
18+rm -fr $TARGETDIR
19+
20+. $WRK/_extract.sh
21+
22+cd $TARGETDIR
23+
24+echo \ \ Configuring...
25+./configure --prefix=/usr \
26+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
27+
28+echo \ \ Making...
29+make \
30+ 1> $LOG/$TARGET.2_install.log 2>&1 || exit 1
31+
32+echo \ \ Installing...
33+paco -p $TARGET 'make install' \
34+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
35+
36+paco -p+ $TARGET "\
37+install -v -m644 -D README /usr/share/doc/libassuan-$VER/README" \
38+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
39+
40+echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none
41+
42+echo \ \ Removing directory...
43+cd .. && rm -fr $TARGETDIR
44+
--- a/BLFS/libprelude.sh
+++ b/BLFS/libprelude.sh
@@ -20,12 +20,7 @@ echo $TARGET
2020 echo \ \ Removing old directory...
2121 rm -fr $TARGETDIR
2222
23-echo \ \ Extracting...
24-if ! test -f $DLD/$TARGETBALL; then
25- echo \ \ Tarball not found: $TARGETBALL && exit 1
26-else
27- tar xf $DLD/$TARGETBALL
28-fi
23+. $WRK/_extract.sh
2924
3025 cd $TARGETDIR
3126
--- /dev/null
+++ b/BLFS/ntp.sh
@@ -0,0 +1,50 @@
1+#!/bin/sh
2+
3+. ./_blfsset.sh
4+
5+VER=4.2.6p5
6+TARGET=ntp-$VER
7+TARGETBALL=$TARGET.tar.gz
8+TARGETDIR=$TARGET
9+
10+echo Check Required...
11+./_checkOptions.sh openssl || exit 1
12+if test "$1" == "check"; then
13+ exit 0
14+fi
15+
16+cd $SRC
17+
18+echo $TARGET
19+
20+echo \ \ Removing old directory...
21+rm -fr $TARGETDIR
22+
23+. $WRK/_extract.sh
24+
25+cd $TARGETDIR
26+
27+echo \ \ Configuring...
28+./configure --prefix=/usr \
29+ --sysconfdir=/etc \
30+ --with-binsubdir=sbin \
31+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
32+
33+echo \ \ Making...
34+make \
35+ 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1
36+
37+echo \ \ Installing...
38+paco -p $TARGET "make install" \
39+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
40+
41+install -v -m755 -d /usr/share/doc/ntp-$VER
42+paco -p+ $TARGET "\
43+cp -v -R html/* /usr/share/doc/ntp-$VER/" \
44+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
45+
46+echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none
47+
48+echo \ \ Removing directory...
49+cd .. && rm -fr $TARGETDIR
50+
--- a/BLFS/opensc.sh
+++ b/BLFS/opensc.sh
@@ -1,6 +1,6 @@
11 #!/bin/sh
22
3-VER=0.11.13
3+VER=0.12.2
44 TARGET=opensc-$VER
55 TARGETBALL=$TARGET.tar.gz
66 TARGETDIR=$TARGET
@@ -20,7 +20,7 @@ echo $TARGET
2020 echo \ \ Removing old directory...
2121 rm -fr $TARGETDIR
2222
23-$WRK/_extract.sh
23+. $WRK/_extract.sh
2424
2525 cd $TARGETDIR
2626
--- a/BLFS/openssl.sh
+++ b/BLFS/openssl.sh
@@ -2,7 +2,7 @@
22
33 . ./_blfsset.sh
44
5-VER=1.0.0g
5+VER=1.0.1
66 TARGET=openssl-$VER
77 TARGETBALL=$TARGET.tar.gz
88 TARGETDIR=$TARGET
--- /dev/null
+++ b/BLFS/patch/cyrus-sasl-2.1.25.patch
@@ -0,0 +1,597 @@
1+Submitted By: Michio Matsuyama <matsuand AT users DOT sourceforge DOT jp>
2+Date: 2012-03-18
3+Description: Unofficial patch for Cyrus SASL 2.1.25.
4+ NO WARRANTY
5+
6+diff -Naur cyrus-sasl-2.1.25.orig/plugins/gs2.c cyrus-sasl-2.1.25/plugins/gs2.c
7+--- cyrus-sasl-2.1.25.orig/plugins/gs2.c 2011-09-02 21:58:02.000000000 +0900
8++++ cyrus-sasl-2.1.25/plugins/gs2.c 2012-03-18 01:45:58.675987888 +0900
9+@@ -72,9 +72,11 @@
10+
11+ #include <config.h>
12+ #include <gssapi/gssapi.h>
13++#ifndef KRB5_HEIMDAL
14+ #ifdef HAVE_GSSAPI_GSSAPI_EXT_H
15+ #include <gssapi/gssapi_ext.h>
16+ #endif
17++#endif
18+ #include <fcntl.h>
19+ #include <stdio.h>
20+ #include <sasl.h>
21+diff -Naur cyrus-sasl-2.1.25.orig/plugins/gs2_token.h cyrus-sasl-2.1.25/plugins/gs2_token.h
22+--- cyrus-sasl-2.1.25.orig/plugins/gs2_token.h 2011-09-02 21:58:02.000000000 +0900
23++++ cyrus-sasl-2.1.25/plugins/gs2_token.h 2012-03-18 01:46:50.310989370 +0900
24+@@ -26,9 +26,11 @@
25+ #include <config.h>
26+
27+ #include <gssapi/gssapi.h>
28++#ifndef KRB5_HEIMDAL
29+ #ifdef HAVE_GSSAPI_GSSAPI_EXT_H
30+ #include <gssapi/gssapi_ext.h>
31+ #endif
32++#endif
33+
34+ #ifndef HAVE_GSS_DECAPSULATE_TOKEN
35+ OM_uint32
36+diff -Naur cyrus-sasl-2.1.25.orig/sasldb/db_berkeley.c cyrus-sasl-2.1.25/sasldb/db_berkeley.c
37+--- cyrus-sasl-2.1.25.orig/sasldb/db_berkeley.c 2011-09-02 21:58:02.000000000 +0900
38++++ cyrus-sasl-2.1.25/sasldb/db_berkeley.c 2012-03-18 01:44:09.641973608 +0900
39+@@ -101,7 +101,7 @@
40+ ret = db_create(mbdb, NULL, 0);
41+ if (ret == 0 && *mbdb != NULL)
42+ {
43+-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
44++#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR == 5
45+ ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660);
46+ #else
47+ ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660);
48+diff -Naur cyrus-sasl-2.1.25.orig/sasldb/db_berkeley.c.orig cyrus-sasl-2.1.25/sasldb/db_berkeley.c.orig
49+--- cyrus-sasl-2.1.25.orig/sasldb/db_berkeley.c.orig 1970-01-01 09:00:00.000000000 +0900
50++++ cyrus-sasl-2.1.25/sasldb/db_berkeley.c.orig 2011-09-02 21:58:02.000000000 +0900
51+@@ -0,0 +1,534 @@
52++/* db_berkeley.c--SASL berkeley db interface
53++ * Rob Siemborski
54++ * Tim Martin
55++ * $Id: db_berkeley.c,v 1.10 2011/09/01 14:12:18 mel Exp $
56++ */
57++/*
58++ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
59++ *
60++ * Redistribution and use in source and binary forms, with or without
61++ * modification, are permitted provided that the following conditions
62++ * are met:
63++ *
64++ * 1. Redistributions of source code must retain the above copyright
65++ * notice, this list of conditions and the following disclaimer.
66++ *
67++ * 2. Redistributions in binary form must reproduce the above copyright
68++ * notice, this list of conditions and the following disclaimer in
69++ * the documentation and/or other materials provided with the
70++ * distribution.
71++ *
72++ * 3. The name "Carnegie Mellon University" must not be used to
73++ * endorse or promote products derived from this software without
74++ * prior written permission. For permission or any other legal
75++ * details, please contact
76++ * Office of Technology Transfer
77++ * Carnegie Mellon University
78++ * 5000 Forbes Avenue
79++ * Pittsburgh, PA 15213-3890
80++ * (412) 268-4387, fax: (412) 268-7395
81++ * tech-transfer@andrew.cmu.edu
82++ *
83++ * 4. Redistributions of any form whatsoever must retain the following
84++ * acknowledgment:
85++ * "This product includes software developed by Computing Services
86++ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
87++ *
88++ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
89++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
90++ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
91++ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
92++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
93++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
94++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
95++ */
96++
97++#include <config.h>
98++
99++#include <db.h>
100++
101++#include <sys/stat.h>
102++#include <stdlib.h>
103++#include <assert.h>
104++#include <errno.h>
105++#include "sasldb.h"
106++
107++static int db_ok = 0;
108++#if defined(KEEP_DB_OPEN)
109++static DB * g_db = NULL;
110++#endif
111++
112++/*
113++ * Open the database
114++ */
115++static int berkeleydb_open(const sasl_utils_t *utils,
116++ sasl_conn_t *conn,
117++ int rdwr, DB **mbdb)
118++{
119++ const char *path = SASL_DB_PATH;
120++ int ret;
121++ int flags;
122++ void *cntxt;
123++ sasl_getopt_t *getopt;
124++
125++#if defined(KEEP_DB_OPEN)
126++ if (g_db) {
127++ *mbdb = g_db;
128++ return SASL_OK;
129++ }
130++#endif
131++
132++ if (utils->getcallback(conn, SASL_CB_GETOPT,
133++ &getopt, &cntxt) == SASL_OK) {
134++ const char *p;
135++ if (getopt(cntxt, NULL, "sasldb_path", &p, NULL) == SASL_OK
136++ && p != NULL && *p != 0) {
137++ path = p;
138++ }
139++ }
140++
141++ if (rdwr) flags = DB_CREATE;
142++ else flags = DB_RDONLY;
143++#if defined(KEEP_DB_OPEN)
144++#if defined(DB_THREAD)
145++ flags |= DB_THREAD;
146++#endif
147++#endif
148++
149++#if DB_VERSION_MAJOR < 3
150++ ret = db_open(path, DB_HASH, flags, 0660, NULL, NULL, mbdb);
151++#else /* DB_VERSION_MAJOR < 3 */
152++ ret = db_create(mbdb, NULL, 0);
153++ if (ret == 0 && *mbdb != NULL)
154++ {
155++#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
156++ ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660);
157++#else
158++ ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660);
159++#endif
160++ if (ret != 0)
161++ {
162++ (void) (*mbdb)->close(*mbdb, 0);
163++ *mbdb = NULL;
164++ }
165++ }
166++#endif /* DB_VERSION_MAJOR < 3 */
167++
168++ if (ret != 0) {
169++ if (rdwr == 0 && ret == ENOENT) {
170++ /* File not found and we are only reading the data.
171++ Treat as SASL_NOUSER. */
172++ return SASL_NOUSER;
173++ }
174++ utils->log(conn, SASL_LOG_ERR,
175++ "unable to open Berkeley db %s: %s",
176++ path, db_strerror(ret));
177++ utils->seterror(conn, SASL_NOLOG, "Unable to open DB");
178++ return SASL_FAIL;
179++ }
180++
181++#if defined(KEEP_DB_OPEN)
182++ /* Save the DB handle for later use */
183++ g_db = *mbdb;
184++#endif
185++ return SASL_OK;
186++}
187++
188++/*
189++ * Close the database
190++ */
191++static void berkeleydb_close(const sasl_utils_t *utils, DB *mbdb)
192++{
193++ int ret;
194++
195++#if defined(KEEP_DB_OPEN)
196++ /* Prevent other threads from reusing the same handle */
197++ /* msdb == g_db */
198++ g_db = NULL;
199++#endif
200++
201++ ret = mbdb->close(mbdb, 0);
202++ if (ret!=0) {
203++ /* error closing! */
204++ utils->log(NULL, SASL_LOG_ERR,
205++ "error closing sasldb: %s",
206++ db_strerror(ret));
207++ }
208++}
209++
210++
211++/*
212++ * Retrieve the secret from the database.
213++ *
214++ * Return SASL_NOUSER if the entry doesn't exist,
215++ * SASL_OK on success.
216++ *
217++ */
218++int _sasldb_getdata(const sasl_utils_t *utils,
219++ sasl_conn_t *context,
220++ const char *auth_identity,
221++ const char *realm,
222++ const char *propName,
223++ char *out, const size_t max_out, size_t *out_len)
224++{
225++ int result = SASL_OK;
226++ char *key;
227++ size_t key_len;
228++ DBT dbkey, data;
229++ DB *mbdb = NULL;
230++
231++ if(!utils) return SASL_BADPARAM;
232++
233++ /* check parameters */
234++ if (!auth_identity || !realm || !propName || !out || !max_out) {
235++ utils->seterror(context, 0,
236++ "Bad parameter in db_berkeley.c: _sasldb_getdata");
237++ return SASL_BADPARAM;
238++ }
239++
240++ if (!db_ok) {
241++ utils->seterror(context, 0,
242++ "Database not checked");
243++ return SASL_FAIL;
244++ }
245++
246++ /* allocate a key */
247++ result = _sasldb_alloc_key(utils, auth_identity, realm, propName,
248++ &key, &key_len);
249++ if (result != SASL_OK) {
250++ utils->seterror(context, 0,
251++ "Could not allocate key in _sasldb_getdata");
252++ return result;
253++ }
254++
255++ /* zero out */
256++ memset(&dbkey, 0, sizeof(dbkey));
257++ memset(&data, 0, sizeof(data));
258++
259++ /* open the db */
260++ result = berkeleydb_open(utils, context, 0, &mbdb);
261++ if (result != SASL_OK) goto cleanup;
262++
263++ /* create the key to search for */
264++ dbkey.data = key;
265++ dbkey.size = (u_int32_t) key_len;
266++ dbkey.flags = DB_DBT_USERMEM;
267++ data.flags = DB_DBT_MALLOC;
268++
269++ /* ask berkeley db for the entry */
270++ result = mbdb->get(mbdb, NULL, &dbkey, &data, 0);
271++
272++ switch (result) {
273++ case 0:
274++ /* success */
275++ break;
276++
277++ case DB_NOTFOUND:
278++ result = SASL_NOUSER;
279++ utils->seterror(context, SASL_NOLOG,
280++ "user: %s@%s property: %s not found in sasldb",
281++ auth_identity,realm,propName);
282++ goto cleanup;
283++ break;
284++ default:
285++ utils->seterror(context, 0,
286++ "error fetching from sasldb: %s",
287++ db_strerror(result));
288++ result = SASL_FAIL;
289++ goto cleanup;
290++ break;
291++ }
292++
293++ if(data.size > max_out + 1)
294++ return SASL_BUFOVER;
295++
296++ if(out_len) *out_len = data.size;
297++ memcpy(out, data.data, data.size);
298++ out[data.size] = '\0';
299++
300++ cleanup:
301++
302++#if !defined(KEEP_DB_OPEN)
303++ if (mbdb != NULL) berkeleydb_close(utils, mbdb);
304++#endif
305++
306++ utils->free(key);
307++ utils->free(data.data);
308++
309++ return result;
310++}
311++
312++/*
313++ * Put or delete an entry
314++ *
315++ *
316++ */
317++
318++int _sasldb_putdata(const sasl_utils_t *utils,
319++ sasl_conn_t *context,
320++ const char *authid,
321++ const char *realm,
322++ const char *propName,
323++ const char *data_in, size_t data_len)
324++{
325++ int result = SASL_OK;
326++ char *key;
327++ size_t key_len;
328++ DBT dbkey;
329++ DB *mbdb = NULL;
330++
331++ if (!utils) return SASL_BADPARAM;
332++
333++ if (!authid || !realm || !propName) {
334++ utils->seterror(context, 0,
335++ "Bad parameter in db_berkeley.c: _sasldb_putdata");
336++ return SASL_BADPARAM;
337++ }
338++
339++ if (!db_ok) {
340++ utils->seterror(context, 0,
341++ "Database not checked");
342++ return SASL_FAIL;
343++ }
344++
345++ result = _sasldb_alloc_key(utils, authid, realm, propName,
346++ &key, &key_len);
347++ if (result != SASL_OK) {
348++ utils->seterror(context, 0,
349++ "Could not allocate key in _sasldb_putdata");
350++ return result;
351++ }
352++
353++ /* open the db */
354++ result=berkeleydb_open(utils, context, 1, &mbdb);
355++ if (result!=SASL_OK) goto cleanup;
356++
357++ /* create the db key */
358++ memset(&dbkey, 0, sizeof(dbkey));
359++ dbkey.data = key;
360++ dbkey.size = (u_int32_t) key_len;
361++
362++ if (data_in) { /* putting secret */
363++ DBT data;
364++
365++ memset(&data, 0, sizeof(data));
366++
367++ data.data = (char *)data_in;
368++ if(!data_len) data_len = strlen(data_in);
369++ data.size = (u_int32_t) data_len;
370++
371++ result = mbdb->put(mbdb, NULL, &dbkey, &data, 0);
372++
373++ if (result != 0)
374++ {
375++ utils->log(NULL, SASL_LOG_ERR,
376++ "error updating sasldb: %s", db_strerror(result));
377++ utils->seterror(context, SASL_NOLOG,
378++ "Couldn't update db");
379++ result = SASL_FAIL;
380++ goto cleanup;
381++ }
382++ } else { /* removing secret */
383++ result=mbdb->del(mbdb, NULL, &dbkey, 0);
384++
385++ if (result != 0)
386++ {
387++ utils->log(NULL, SASL_LOG_ERR,
388++ "error deleting entry from sasldb: %s", db_strerror(result));
389++ utils->seterror(context, SASL_NOLOG,
390++ "Couldn't update db");
391++ if (result == DB_NOTFOUND)
392++ result = SASL_NOUSER;
393++ else
394++ result = SASL_FAIL;
395++ goto cleanup;
396++ }
397++ }
398++
399++ cleanup:
400++
401++#if !defined(KEEP_DB_OPEN)
402++ if (mbdb != NULL) berkeleydb_close(utils, mbdb);
403++#endif
404++
405++ utils->free(key);
406++
407++ return result;
408++}
409++
410++int _sasl_check_db(const sasl_utils_t *utils,
411++ sasl_conn_t *conn)
412++{
413++ const char *path = SASL_DB_PATH;
414++ int ret;
415++ void *cntxt;
416++ sasl_getopt_t *getopt;
417++ sasl_verifyfile_t *vf;
418++
419++ if (!utils) return SASL_BADPARAM;
420++
421++ if (utils->getcallback(conn, SASL_CB_GETOPT,
422++ &getopt, &cntxt) == SASL_OK) {
423++ const char *p;
424++ if (getopt(cntxt, NULL, "sasldb_path", &p, NULL) == SASL_OK
425++ && p != NULL && *p != 0) {
426++ path = p;
427++ }
428++ }
429++
430++ ret = utils->getcallback(conn, SASL_CB_VERIFYFILE,
431++ (sasl_callback_ft *)&vf, &cntxt);
432++ if (ret != SASL_OK) {
433++ utils->seterror(conn, 0, "verifyfile failed");
434++ return ret;
435++ }
436++
437++ ret = vf(cntxt, path, SASL_VRFY_PASSWD);
438++
439++ if (ret == SASL_OK) {
440++ db_ok = 1;
441++ }
442++
443++ if (ret == SASL_OK || ret == SASL_CONTINUE) {
444++ return SASL_OK;
445++ } else {
446++ return ret;
447++ }
448++}
449++
450++#if defined(KEEP_DB_OPEN)
451++void sasldb_auxprop_free (void *glob_context,
452++ const sasl_utils_t *utils)
453++{
454++ if (g_db != NULL) berkeleydb_close(utils, g_db);
455++}
456++#endif
457++
458++typedef struct berkeleydb_handle
459++{
460++ DB *mbdb;
461++ DBC *cursor;
462++} berkleyhandle_t;
463++
464++sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
465++ sasl_conn_t *conn)
466++{
467++ int ret;
468++ DB *mbdb;
469++ berkleyhandle_t *handle;
470++
471++ if(!utils || !conn) return NULL;
472++
473++ if(!db_ok) {
474++ utils->seterror(conn, 0, "Database not OK in _sasldb_getkeyhandle");
475++ return NULL;
476++ }
477++
478++ ret = berkeleydb_open(utils, conn, 0, &mbdb);
479++
480++ if (ret != SASL_OK) {
481++ return NULL;
482++ }
483++
484++ handle = utils->malloc(sizeof(berkleyhandle_t));
485++ if(!handle) {
486++#if !defined(KEEP_DB_OPEN)
487++ (void)mbdb->close(mbdb, 0);
488++#endif
489++ utils->seterror(conn, 0, "Memory error in _sasldb_gethandle");
490++ return NULL;
491++ }
492++
493++ handle->mbdb = mbdb;
494++ handle->cursor = NULL;
495++
496++ return (sasldb_handle)handle;
497++}
498++
499++int _sasldb_getnextkey(const sasl_utils_t *utils __attribute__((unused)),
500++ sasldb_handle handle, char *out,
501++ const size_t max_out, size_t *out_len)
502++{
503++ DB *mbdb;
504++ int result;
505++ berkleyhandle_t *dbh = (berkleyhandle_t *)handle;
506++ DBT key, data;
507++
508++ if(!utils || !handle || !out || !max_out)
509++ return SASL_BADPARAM;
510++
511++ mbdb = dbh->mbdb;
512++
513++ memset(&key,0, sizeof(key));
514++ memset(&data,0,sizeof(data));
515++
516++ if(!dbh->cursor) {
517++ /* make cursor */
518++#if DB_VERSION_MAJOR < 3
519++#if DB_VERSION_MINOR < 6
520++ result = mbdb->cursor(mbdb, NULL,&dbh->cursor);
521++#else
522++ result = mbdb->cursor(mbdb, NULL,&dbh->cursor, 0);
523++#endif /* DB_VERSION_MINOR < 7 */
524++#else /* DB_VERSION_MAJOR < 3 */
525++ result = mbdb->cursor(mbdb, NULL,&dbh->cursor, 0);
526++#endif /* DB_VERSION_MAJOR < 3 */
527++
528++ if (result!=0) {
529++ return SASL_FAIL;
530++ }
531++
532++ /* loop thru */
533++ result = dbh->cursor->c_get(dbh->cursor, &key, &data,
534++ DB_FIRST);
535++ } else {
536++ result = dbh->cursor->c_get(dbh->cursor, &key, &data,
537++ DB_NEXT);
538++ }
539++
540++ if (result == DB_NOTFOUND) return SASL_OK;
541++
542++ if (result != 0) {
543++ return SASL_FAIL;
544++ }
545++
546++ if (key.size > max_out) {
547++ return SASL_BUFOVER;
548++ }
549++
550++ memcpy(out, key.data, key.size);
551++ if (out_len) *out_len = key.size;
552++
553++ return SASL_CONTINUE;
554++}
555++
556++
557++int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
558++ sasldb_handle handle)
559++{
560++ berkleyhandle_t *dbh = (berkleyhandle_t *)handle;
561++ int ret = 0;
562++
563++ if (!utils || !dbh) return SASL_BADPARAM;
564++
565++ if (dbh->cursor) {
566++ dbh->cursor->c_close(dbh->cursor);
567++ }
568++
569++#if !defined(KEEP_DB_OPEN)
570++ /* This is almost the same berkeleydb_close(), except that
571++ berkeleydb_close logs a message on error and does not return
572++ any error */
573++ if (dbh->mbdb) {
574++ ret = dbh->mbdb->close(dbh->mbdb, 0);
575++ }
576++#endif
577++
578++ utils->free(dbh);
579++
580++ if (ret) {
581++ return SASL_FAIL;
582++ } else {
583++ return SASL_OK;
584++ }
585++}
586+diff -Naur cyrus-sasl-2.1.25.orig/utils/dbconverter-2.c cyrus-sasl-2.1.25/utils/dbconverter-2.c
587+--- cyrus-sasl-2.1.25.orig/utils/dbconverter-2.c 2003-02-14 04:56:17.000000000 +0900
588++++ cyrus-sasl-2.1.25/utils/dbconverter-2.c 2012-03-18 01:44:09.646974025 +0900
589+@@ -214,7 +214,7 @@
590+ ret = db_create(mbdb, NULL, 0);
591+ if (ret == 0 && *mbdb != NULL)
592+ {
593+-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
594++#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR == 5
595+ ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664);
596+ #else
597+ ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664);
--- /dev/null
+++ b/BLFS/pcsc-wrapper.sh
@@ -0,0 +1,46 @@
1+#!/bin/sh
2+
3+VER=2.0
4+TARGET=pcsc-wrapper-$VER
5+TARGETBALL=$TARGET.tar.gz
6+TARGETDIR=$TARGET
7+
8+echo Incomplete! && exit 1
9+
10+. ./_blfsset.sh
11+
12+echo Check Required...
13+./_checkRequired.sh || exit 1
14+if test "$1" == "check"; then
15+ exit 0
16+fi
17+
18+cd $SRC
19+
20+echo $TARGET
21+
22+echo \ \ Removing old directory...
23+rm -fr $TARGETDIR
24+
25+mkdir -pv $TARGETDIR
26+cd $TARGETDIR
27+
28+. $WRK/_extract.sh
29+
30+echo \ \ Configuring...
31+./configure --prefix=/usr \
32+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
33+
34+echo \ \ Making...
35+make \
36+ 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1
37+
38+echo \ \ Installing...
39+paco -p $TARGET 'make install' \
40+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
41+
42+echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none
43+
44+echo \ \ Removing directory...
45+cd .. && rm -fr $TARGETDIR
46+
--- a/BLFS/samba.sh
+++ b/BLFS/samba.sh
@@ -76,7 +76,7 @@ paco -p+ $TARGET "install -v -m644 ../docs/*.pdf /usr/share/doc/samba-$VER" \
7676
7777 sed -e "s/MYGROUP/WORKGROUP/" \
7878 -e "s/writable = yes/writable = yes\n create mask = 0644\n directory mask = 0755/" /etc/samba/smb.conf.default > /etc/samba/smb.conf
79-paco -p+ $SCRIPT "touch /etc/samba/smb.conf"
79+paco -p+ $TARGET "touch /etc/samba/smb.conf"
8080
8181 echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none
8282
--- a/BLFS/sudo.sh
+++ b/BLFS/sudo.sh
@@ -8,16 +8,17 @@ TARGETBALL=$TARGET.tar.gz
88 TARGETDIR=$TARGET
99
1010 echo Check Required...
11-./_checkRequired.sh || exit 1
11+./_checkRequired.sh Linux-PAM || exit 1
1212
1313 echo Check Options...
14-. ./_checkOptions.sh Linux-PAM shadow sendmail
14+. ./_checkOptions.sh shadow sendmail
1515
16-if [ ${OPTION_LinuxPAM} -eq "1" ]; then
17- export WITHPAM=""
18-else
19- export WITHPAM="--without-pam "
20-fi
16+#if [ ${OPTION_LinuxPAM} -eq "1" ]; then
17+# export WITHPAM=""
18+#else
19+# export WITHPAM="--without-pam "
20+#fi
21+export WITHPAM=""
2122
2223 if [ ${OPTION_sendmail} -eq "1" ]; then
2324 export WITHSENDMAIL=""
@@ -38,12 +39,9 @@ cd $TARGETDIR
3839
3940 echo \ \ Configuring...
4041 ./configure --prefix=/usr \
41- --libexecdir=/usr/lib \
42- --with-ignore-dot \
42+ --libexecdir=/usr/lib/sudo \
4343 --with-all-insults \
44- --enable-shell-sets-home \
45- --disable-root-sudo \
46- --with-logfac=auth \
44+ --with-env-editor \
4745 $WITHPAM $WITHSENDMAIL \
4846 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
4947
@@ -55,9 +53,29 @@ echo \ \ Installing...
5553 paco -p $TARGET "make install" \
5654 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
5755
58-paco -p+ $TARGET "\
59-sed -e 's@/su@/sudo@' -e '/pam_rootok/d' \
60- /etc/pam.d/su > /etc/pam.d/sudo"
56+#paco -p+ $TARGET "\
57+#sed -e 's@/su@/sudo@' -e '/pam_rootok/d' \
58+# /etc/pam.d/su > /etc/pam.d/sudo"
59+
60+cat > /etc/pam.d/sudo << "EOF"
61+# Begin /etc/pam.d/sudo
62+
63+# include the default auth settings
64+auth include system-auth
65+
66+# include the default account settings
67+account include system-account
68+
69+# Set default environment variables for the service user
70+session required pam_env.so
71+
72+# include system session defaults
73+session include system-session
74+
75+# End /etc/pam.d/sudo
76+EOF
77+chmod 644 /etc/pam.d/sudo
78+paco -p+ $TARGET "touch /etc/pam.d/sudo"
6179
6280 echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none
6381
--- a/LFS/6.08.sh
+++ b/LFS/6.08.sh
@@ -5,7 +5,7 @@ CHAP=`echo $THISFILE | sed s/\.sh//`
55
66 VER=3.37
77 TARGET=man-pages-$VER
8-TARGETBALL=$TARGET.tar.gz
8+TARGETBALL=$TARGET.tar.xz
99 TARGETDIR=$TARGET
1010
1111 echo $CHAP: $TARGET
--- a/LFS/6.63b.sh
+++ b/LFS/6.63b.sh
@@ -5,9 +5,7 @@ CHAP=`echo $THISFILE | sed s/\.sh//`
55
66 TARGET=chroot
77
8-. ./_lfsset.sh
9-
108 /tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
119 -exec /tools/bin/strip --strip-debug '{}' ';' \
12- 1> $LOG/$TARGET.1_strip.log 2>&1
10+ 1> /dev/null 2>&1
1311