~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/common/xf86DoProbe.c

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DoProbe.c,v 1.11 2002/07/02 02:00:03 tsi Exp $ */
 
2
/*
 
3
 * finish setting up the server
 
4
 * Load the driver modules and call their probe functions.
 
5
 *
 
6
 * Copyright 1999 by The XFree86 Project, Inc.
 
7
 *
 
8
 */
 
9
 
 
10
#include <ctype.h>
 
11
#include <stdlib.h>
 
12
#include "X.h"
 
13
#include "Xmd.h"
 
14
#include "os.h"
 
15
#ifdef XFree86LOADER
 
16
#include "loaderProcs.h"
 
17
#include "xf86Config.h"
 
18
#endif /* XFree86LOADER */
 
19
#include "xf86.h"
 
20
#include "xf86Priv.h"
 
21
 
 
22
void
 
23
DoProbeArgs(int argc, char **argv, int i)
 
24
{
 
25
}
 
26
 
 
27
void
 
28
DoProbe()
 
29
{
 
30
    int i;
 
31
    Bool probeResult;
 
32
 
 
33
#ifdef XFree86LOADER
 
34
    /* Find the list of video driver modules. */
 
35
    char **list = xf86DriverlistFromCompile();
 
36
    char **l;
 
37
 
 
38
    if (list) {
 
39
        ErrorF("List of video driver modules:\n");
 
40
        for (l = list; *l; l++)
 
41
            ErrorF("\t%s\n", *l);
 
42
    } else {
 
43
        ErrorF("No video driver modules found\n");
 
44
    }
 
45
 
 
46
    /* Load all the drivers that were found. */
 
47
    xf86LoadModules(list, NULL);
 
48
#endif /* XFree86LOADER */
 
49
 
 
50
    /* Disable PCI devices */
 
51
    xf86AccessInit();
 
52
 
 
53
    /* Call all of the probe functions, reporting the results. */
 
54
    for (i = 0; i < xf86NumDrivers; i++) {
 
55
        if (xf86DriverList[i]->Probe == NULL) continue;
 
56
 
 
57
        xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n",
 
58
            xf86DriverList[i]->driverName);
 
59
        probeResult =
 
60
            (*xf86DriverList[i]->Probe)(xf86DriverList[i], PROBE_DETECT);
 
61
        if (!probeResult) {
 
62
            xf86ErrorF("Probe in driver `%s' returns FALSE\n",
 
63
                xf86DriverList[i]->driverName);
 
64
        } else {
 
65
            xf86ErrorF("Probe in driver `%s' returns TRUE\n",
 
66
                xf86DriverList[i]->driverName);
 
67
 
 
68
            /* If we have a result, then call driver's Identify function */
 
69
            if (xf86DriverList[i]->Identify != NULL) {
 
70
                int verbose = xf86Verbose;
 
71
 
 
72
                xf86Verbose = 1;
 
73
                (*xf86DriverList[i]->Identify)(0);
 
74
                xf86Verbose = verbose;
 
75
            }
 
76
        }
 
77
    }
 
78
 
 
79
    OsCleanup();
 
80
    AbortDDX();
 
81
    fflush(stderr);
 
82
    exit(0);
 
83
}