summaryrefslogtreecommitdiffstats
path: root/kernel-armv7hl-fedora.config
diff options
context:
space:
mode:
Diffstat (limited to 'kernel-armv7hl-fedora.config')
-rw-r--r--kernel-armv7hl-fedora.config10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel-armv7hl-fedora.config b/kernel-armv7hl-fedora.config
index 87f5e4d30..6f058b1dd 100644
--- a/kernel-armv7hl-fedora.config
+++ b/kernel-armv7hl-fedora.config
@@ -3770,7 +3770,6 @@ CONFIG_MTD_NAND_CAFE=m
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_ECC_SW_BCH is not set
# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC is not set
-# CONFIG_MTD_NAND_FSL_IFC is not set
CONFIG_MTD_NAND_GPIO=m
CONFIG_MTD_NAND_GPMI_NAND=m
# CONFIG_MTD_NAND_HISI504 is not set
@@ -3795,8 +3794,11 @@ CONFIG_MTD_OF_PARTS=m
# CONFIG_MTD_PARTITIONED_MASTER is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_PHYSMAP_GEMINI is not set
+# CONFIG_MTD_PHYSMAP_IXP4XX is not set
CONFIG_MTD_PHYSMAP=m
-# CONFIG_MTD_PHYSMAP_OF is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_PHYSMAP_VERSATILE is not set
# CONFIG_MTD_PLATRAM is not set
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_RAM is not set
@@ -5359,7 +5361,7 @@ CONFIG_RTC_DRV_PCF2123=m
CONFIG_RTC_DRV_PCF2127=m
CONFIG_RTC_DRV_PCF85063=m
CONFIG_RTC_DRV_PCF8523=m
-# CONFIG_RTC_DRV_PCF85363 is not set
+CONFIG_RTC_DRV_PCF85363=m
CONFIG_RTC_DRV_PCF8563=m
CONFIG_RTC_DRV_PCF8583=m
CONFIG_RTC_DRV_PL030=y
@@ -6461,7 +6463,7 @@ CONFIG_SPI_DW_MMIO=m
CONFIG_SPI_DW_PCI=m
CONFIG_SPI_FSL_LPSPI=m
CONFIG_SPI_FSL_QUADSPI=m
-# CONFIG_SPI_FSL_SPI is not set
+CONFIG_SPI_FSL_SPI=m
CONFIG_SPI_GPIO=m
# CONFIG_SPI_HISI_SFC_V3XX is not set
CONFIG_SPI_IMX=m
?h=ticket-380-6&id=da1e6e2f49f66fd46c8039ff1aa4386309fba8f4'>com/netscape/cmscore/ldapconn/LdapAnonConnFactory.java
blob: dc4c86547266b9aa1b3c6ddc835f124a9e7d9cf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2007 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.ldapconn;

import netscape.ldap.LDAPConnection;
import netscape.ldap.LDAPException;
import netscape.ldap.LDAPSocketFactory;

import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.ldap.ELdapException;
import com.netscape.certsrv.ldap.ELdapServerDownException;
import com.netscape.certsrv.ldap.ILdapConnFactory;
import com.netscape.certsrv.logging.ILogger;

/**
 * Factory for getting LDAP Connections to a LDAP server
 * each connection is a seperate thread that can be bound to a different
 * authentication dn and password.
 */
public class LdapAnonConnFactory implements ILdapConnFactory {
    protected int mMinConns = 5;
    protected int mMaxConns = 1000;
    protected LdapConnInfo mConnInfo = null;

    private ILogger mLogger = CMS.getLogger();

    public static final String PROP_MINCONNS = "minConns";
    public static final String PROP_MAXCONNS = "maxConns";
    public static final String PROP_LDAPCONNINFO = "ldapconn";

    public static final String PROP_ERROR_IF_DOWN = "errorIfDown";

    private int mNumConns = 0; // number of available conns in array
    private int mTotal = 0; // total num conns 
    private AnonConnection mConns[] = null;

    private boolean mInited = false;

    private boolean mErrorIfDown;
    private boolean mDefErrorIfDown = false;

    /**
     * Constructor for initializing from the config store.
     * must be followed by init(IConfigStore)
     */
    public LdapAnonConnFactory() {
    }

    public LdapAnonConnFactory(boolean defErrorIfDown) {
        mDefErrorIfDown = defErrorIfDown;
    }

    /**
     * Constructor for LdapAnonConnFactory
     * 
     * @param minConns minimum number of connections to have available
     * @param maxConns max number of connections to have available. This is
     *            the maximum number of clones of this connection one wants to allow.
     * @param serverInfo server connection info - host, port, etc.
     */
    public LdapAnonConnFactory(int minConns, int maxConns,
            LdapConnInfo connInfo) throws ELdapException {
        init(minConns, maxConns, connInfo);
    }

    public int totalConn() {
        return mTotal;
    }

    public int freeConn() {
        return mNumConns;
    }

    public int maxConn() {
        return mMaxConns;
    }

    /**
     * init routine to be called when initialize from config store.
     */
    public void init(IConfigStore config) throws EBaseException, ELdapException {
        String minStr = config.getString(PROP_MINCONNS, "");
        String maxStr = config.getString(PROP_MAXCONNS, "");
        int minConns = mMinConns;
        int maxConns = mMaxConns;

        // if it is "", use the default value
        if (!minStr.equals("")) {
            try {
                minConns = Integer.parseInt(minStr);
            } catch (NumberFormatException e) {
                log(ILogger.LL_FAILURE,
                        CMS.getLogMessage("CMSCORE_LDAPCONN_MIN_CONN"));
                throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_NUMBER_FORMAT_1", PROP_MINCONNS));
            }
        }

        // if it is "", use the default value
        if (!maxStr.equals("")) {
            try {
                maxConns = Integer.parseInt(maxStr);
            } catch (NumberFormatException e) {
                log(ILogger.LL_FAILURE,
                        CMS.getLogMessage("CMSCORE_LDAPCONN_MAX_CONN"));
                throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_NUMBER_FORMAT_1", PROP_MAXCONNS));
            }
        }

        mErrorIfDown = config.getBoolean(PROP_ERROR_IF_DOWN, mDefErrorIfDown);

        init(minConns, maxConns,
                new LdapConnInfo(config.getSubStore(PROP_LDAPCONNINFO)));
    }

    /**
     * initialize routine from parameters.
     */
    protected void init(int minConns, int maxConns, LdapConnInfo connInfo)
            throws ELdapException {
        if (mInited)
            return; // XXX should throw exception here ? 

        if (minConns <= 0 || maxConns <= 0 || minConns > maxConns)
            throw new ELdapException(
                    CMS.getUserMessage("CMS_LDAP_INVALID_NUMCONN_PARAMETERS"));
        if (connInfo == null)
            throw new IllegalArgumentException("connInfo is Null!");

        mMinConns = minConns;
        mMaxConns = maxConns;
        mConnInfo = connInfo;

        mConns = new AnonConnection[mMaxConns];

        log(ILogger.LL_INFO,
                "Created: min " + minConns + " max " + maxConns +
                        " host " + connInfo.getHost() + " port " + connInfo.getPort() +
                        " secure " + connInfo.getSecure());

        // initalize minimum number of connection handles available.
        makeMinimum(mErrorIfDown);
        mInited = true;
    }

    /**
     * make the mininum configured connections
     */
    protected void makeMinimum(boolean errorIfDown) throws ELdapException {
        try {
            if (mNumConns < mMinConns && mTotal < mMaxConns) {
                int increment = Math.min(mMinConns - mNumConns, mMaxConns - mTotal);

                CMS.debug(
                        "increasing minimum number of connections by " + increment);
                for (int i = increment - 1; i >= 0; i--) {
                    mConns[i] = new AnonConnection(mConnInfo);
                }
                mTotal += increment;
                mNumConns += increment;
                CMS.debug(
                        "new total number of connections " + mTotal);
                CMS.debug(
                        "new total available connections " + mNumConns);
            }
        } catch (LDAPException e) {
            // XXX errorCodeToString() used here so users won't see message.
            // though why are messages from exceptions being displayed to 
            // users ?
            if (e.getLDAPResultCode() == LDAPException.UNAVAILABLE) {
                // need to intercept this because message from LDAP is 
                // "DSA is unavailable" which confuses with DSA PKI.
                log(ILogger.LL_FAILURE,
                        "Cannot connect to Ldap server. Error: " +
                                "Ldap Server host " + mConnInfo.getHost() +
                                " int " + mConnInfo.getPort() + " is unavailable.");
                if (errorIfDown) {
                    throw new ELdapServerDownException(
                            CMS.getUserMessage("CMS_LDAP_SERVER_UNAVAILABLE",
                                    mConnInfo.getHost(), "" + mConnInfo.getPort()));
                }
            } else {
                log(ILogger.LL_FAILURE,
                        "Cannot connect to ldap server. error: " + e.toString());
                String errmsg = e.errorCodeToString();

                if (errmsg == null)
                    errmsg = e.toString();
                throw new ELdapException(
                        CMS.getUserMessage("CMS_LDAP_CONNECT_TO_LDAP_SERVER_FAILED",
                                mConnInfo.getHost(), "" + (Integer.valueOf(mConnInfo.getPort())), errmsg));
            }
        }
    }

    /**
     * Gets connection from this factory.
     * All connections gotten from this factory must be returned.
     * If not the max number of connections may be reached prematurely.
     * The best thing to put returnConn in a finally clause so it
     * always gets called. For example,
     * 
     * <pre>
     * LDAPConnection c = null;
     * try {
     *     c = factory.getConn();
     *     myclass.do_something_with_c(c);
     * } catch (ELdapException e) {
     *     handle_error_here();
     * } finally {
     *     factory.returnConn(c);
     * }