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

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/XF86Setup/srvflags.tcl

  • 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
# $XConsortium: srvflags.tcl /main/2 1996/10/25 10:21:38 kaleb $
 
2
#
 
3
#
 
4
#
 
5
#
 
6
# $XFree86: xc/programs/Xserver/hw/xfree86/XF86Setup/srvflags.tcl,v 3.6 1998/04/05 16:15:53 robin Exp $
 
7
#
 
8
# Copyright 1996 by Joseph V. Moss <joe@XFree86.Org>
 
9
#
 
10
# See the file "LICENSE" for information regarding redistribution terms,
 
11
# and for a DISCLAIMER OF ALL WARRANTIES.
 
12
#
 
13
 
 
14
#
 
15
# Configuration of misc server flags
 
16
#
 
17
 
 
18
proc Other_create_widgets { win } {
 
19
        global ServerFlags otherZap otherZoom otherTrapSignals
 
20
        global otherXvidtune otherInpDevMods
 
21
        global pc98_EGC messages
 
22
 
 
23
        set w [winpathprefix $win]
 
24
        if !$pc98_EGC {
 
25
            frame $w.other -width 640 -height 420 \
 
26
                    -relief ridge -borderwidth 5
 
27
        } else {
 
28
            frame $w.other -width 640 -height 400 \
 
29
                    -relief ridge -borderwidth 5
 
30
        }
 
31
        frame $w.srvflags -bd 2 -relief sunken
 
32
        pack  $w.srvflags -in $w.other \
 
33
                -fill both -expand yes -padx 20m -pady 20m
 
34
        label $w.srvflags.title -text $messages(srvflags.1)
 
35
        pack  $w.srvflags.title -side top -fill both -expand yes
 
36
        frame $w.srvflags.line -height 2 -bd 2 -relief sunken
 
37
        pack  $w.srvflags.line -side top -fill x -pady 2m
 
38
        checkbutton $w.srvflags.zap         -indicatoron true \
 
39
                -text $messages(srvflags.2) \
 
40
                -variable otherZap -anchor w
 
41
        checkbutton $w.srvflags.zoom        -indicatoron true \
 
42
                -text $messages(srvflags.3) \
 
43
                -variable otherZoom -anchor w
 
44
        checkbutton $w.srvflags.trapsignals -indicatoron true \
 
45
                -text $messages(srvflags.4) \
 
46
                -variable otherTrapSignals -anchor w
 
47
        checkbutton $w.srvflags.nonlocalxvidtune -indicatoron true \
 
48
                -text $messages(srvflags.5) \
 
49
                -variable otherXvidtune -anchor w
 
50
        checkbutton $w.srvflags.nonlocalmodindev -indicatoron true \
 
51
                -text $messages(srvflags.6) \
 
52
                -variable otherInpDevMods -anchor w
 
53
        pack $w.srvflags.zap $w.srvflags.zoom $w.srvflags.trapsignals \
 
54
                -anchor w -expand yes -fill x -padx 15m
 
55
        pack $w.srvflags.nonlocalxvidtune $w.srvflags.nonlocalmodindev \
 
56
                -anchor w -expand yes -fill x -padx 15m
 
57
        set otherZap    [expr [string length $ServerFlags(DontZap)] == 0]
 
58
        set otherZoom   [expr [string length $ServerFlags(DontZoom)] == 0]
 
59
        set otherTrapSignals    [expr [string length \
 
60
                                $ServerFlags(NoTrapSignals)] > 0]
 
61
        set otherXvidtune       [expr [string length \
 
62
                                $ServerFlags(AllowNonLocalXvidtune)] > 0]
 
63
        set otherInpDevMods     [expr [string length \
 
64
                                $ServerFlags(AllowNonLocalModInDev)] > 0]
 
65
 
 
66
}
 
67
 
 
68
proc Other_activate { win } {
 
69
        set w [winpathprefix $win]
 
70
        pack $w.other -side top -fill both -expand yes
 
71
}
 
72
 
 
73
proc Other_deactivate { win } {
 
74
        global ServerFlags otherZap otherZoom otherTrapSignals
 
75
        global otherXvidtune otherInpDevMods
 
76
 
 
77
        set w [winpathprefix $win]
 
78
        pack forget $w.other
 
79
        set ServerFlags(DontZap)  [expr $otherZap?"":"DontZap"]
 
80
        set ServerFlags(DontZoom) [expr $otherZoom?"":"DontZoom"]
 
81
        set ServerFlags(NoTrapSignals) \
 
82
                [expr $otherTrapSignals?"NoTrapSignals":""]
 
83
        set ServerFlags(AllowNonLocalXvidtune) \
 
84
                [expr $otherXvidtune?"AllowNonLocalXvidtune":""]
 
85
        set ServerFlags(AllowNonLocalModInDev) \
 
86
                [expr $otherInpDevMods?"AllowNonLocalModInDev":""]
 
87
}
 
88
 
 
89
proc Other_popup_help { win } {
 
90
        catch {destroy .otherhelp}
 
91
        toplevel .otherhelp -bd 5 -relief ridge
 
92
        wm title .otherhelp "Help"
 
93
        wm geometry .otherhelp +30+30
 
94
        text   .otherhelp.text
 
95
        .otherhelp.text insert 0.0 "\n\n\
 
96
                On this screen you can select the settings of various\
 
97
                server options.\n\
 
98
                These should already be set to the values most often used\n\
 
99
                and generally you don't need to make any changes.\n\n\
 
100
                If you would like more information regarding what each\
 
101
                of these do,\n\
 
102
                read the XF86Config man page."
 
103
        .otherhelp.text configure -state disabled
 
104
        button .otherhelp.ok -text "Dismiss" -command "destroy .otherhelp"
 
105
        focus  .otherhelp.ok
 
106
        pack   .otherhelp.text .otherhelp.ok
 
107
}
 
108