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

« back to all changes in this revision

Viewing changes to unix/xc/programs/rstart/Imakefile

  • 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
XCOMM $Xorg: Imakefile,v 1.4 2000/08/17 19:54:01 cpqbld Exp $
 
2
XCOMM
 
3
XCOMM
 
4
XCOMM
 
5
XCOMM
 
6
XCOMM $XFree86: xc/programs/rstart/Imakefile,v 3.11 2002/05/31 18:46:08 dawes Exp $
 
7
XCOMM
 
8
XCOMM Copyright (c) 1993 Quarterdeck Office Systems
 
9
XCOMM
 
10
XCOMM Permission to use, copy, modify, distribute, and sell this software
 
11
XCOMM and software and its documentation for any purpose is hereby granted
 
12
XCOMM without fee, provided that the above copyright notice appear in all
 
13
XCOMM copies and that both that copyright notice and this permission
 
14
XCOMM notice appear in supporting documentation, and that the name
 
15
XCOMM Quarterdeck Office Systems, Inc. not be used in advertising or
 
16
XCOMM publicity pertaining to distribution of this software without
 
17
XCOMM specific, written prior permission.
 
18
XCOMM
 
19
XCOMM THIS SOFTWARE IS PROVIDED 'AS-IS'.  QUARTERDECK OFFICE SYSTEMS,
 
20
XCOMM INC., DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
21
XCOMM INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF
 
22
XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 
23
XCOMM NONINFRINGEMENT.  IN NO EVENT SHALL QUARTERDECK OFFICE SYSTEMS,
 
24
XCOMM INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING SPECIAL,
 
25
XCOMM INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, OR
 
26
XCOMM PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS
 
27
XCOMM OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT
 
28
XCOMM OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
29
 
 
30
XCOMM Having had to change the name once, I do not want it to be tough
 
31
XCOMM the next time...
 
32
 
 
33
SERVERNAME=rstartd
 
34
SSERVERNAME=$(SERVERNAME)
 
35
RSERVERNAME=$(SERVERNAME).real
 
36
SSERVERSRC=server.cpp
 
37
OS=
 
38
CLIENTNAME=rstart
 
39
 
 
40
MYLIBDIR=$(LIBDIR)/rstart
 
41
ENVPREFIX=RSTART
 
42
PACKAGEname=rstart
 
43
 
 
44
USRBIN=DefaultUsrBin
 
45
 
 
46
#ifndef RshCmd
 
47
# if    SystemV
 
48
#  ifdef HPArchitecture
 
49
#   define      RshCmd  remsh
 
50
#  else
 
51
#   define      RshCmd  rcmd
 
52
#  endif
 
53
# else
 
54
#  define       RshCmd  rsh
 
55
# endif
 
56
#endif
 
57
 
 
58
RSHCMD=RshCmd
 
59
 
 
60
           SRCS = server.c auth.c
 
61
           OBJS = server.o auth.o
 
62
 
 
63
SRVDEFS = -DSERVERNAME=\"$(SERVERNAME)\" -DDEFAULT_CONFIG=\"$(MYLIBDIR)/config\"
 
64
#if !HasPutenv
 
65
PEDEFS = -DNOPUTENV
 
66
#endif
 
67
 
 
68
AllTarget(ProgramTargetName($(RSERVERNAME)))
 
69
NormalProgramTarget($(RSERVERNAME), $(OBJS),NullParameter,NullParameter,NullParameter)
 
70
InstallProgram($(RSERVERNAME),$(MYLIBDIR))
 
71
 
 
72
SpecialCObjectRule(server,NullParameter,$(SRVDEFS) $(PEDEFS))
 
73
 
 
74
AllTarget($(SSERVERNAME))
 
75
CppScriptTarget($(SSERVERNAME),$(SSERVERSRC),$(OS) -DLIBDIR=$(MYLIBDIR) -DSERVERNAME=$(SERVERNAME),NullParameter)
 
76
InstallNamedProg($(SSERVERNAME),$(SSERVERNAME),$(BINDIR))
 
77
 
 
78
AllTarget($(CLIENTNAME))
 
79
CppScriptTarget($(CLIENTNAME),client.cpp,-DRSHCMD=$(RSHCMD) -DSERVERNAME=$(SERVERNAME),NullParameter)
 
80
InstallNamedProg($(CLIENTNAME),$(CLIENTNAME),$(BINDIR))
 
81
 
 
82
AllTarget(config)
 
83
CppFileTarget(config,config.cpp,-DBINDIR=$(BINDIR) -DLIBDIR=$(MYLIBDIR) -DPACKAGEname=$(PACKAGEname) -DENVPREFIX=$(ENVPREFIX),NullParameter)
 
84
InstallNonExecFile(config,$(MYLIBDIR))
 
85
 
 
86
#ifdef  ProjectRoot
 
87
DEFAULT_X_MANPATH=$(MANPATH):SystemManDirectory
 
88
#else
 
89
DEFAULT_X_MANPATH=SystemManDirectory
 
90
#endif
 
91
 
 
92
DEFAULT_USER_PATH=DefaultUserPath
 
93
 
 
94
#define MakeDirect(dir) if [ -d dir ]; then set +x;                     \@@\
 
95
                else (set -x; $(MKDIRHIER) dir); fi
 
96
 
 
97
#define FilterContext(src, dest) RemoveFile(dest);                      \@@\
 
98
        sed                                                             \@@\
 
99
                -e 's,_PATH,$(DEFAULT_USER_PATH),g'                     \@@\
 
100
                -e 's,_MANPATH,$(DEFAULT_X_MANPATH),g'                  \@@\
 
101
                < src > dest
 
102
 
 
103
#define FilterCommand(src, dest) RemoveFile(dest);                      \@@\
 
104
        sed                                                             \@@\
 
105
                -e 's,ENVPREFIX,$(ENVPREFIX),g'                         \@@\
 
106
                < src > dest;                                           \@@\
 
107
        case `basename dest` in                                         \@@\
 
108
        @*)                                                             \@@\
 
109
                ;;                                                      \@@\
 
110
        *)                                                              \@@\
 
111
                chmod a+x dest ;;                                       \@@\
 
112
        esac
 
113
 
 
114
#define Recurse(src, dest, filefunc) set -x;                            \@@\
 
115
        for name in `find src -print | grep -v CVS` ;                   \@@\
 
116
                do                                                      \@@\
 
117
                        if test -f $$name;                              \@@\
 
118
                        then                                            \@@\
 
119
                                filefunc($$name,$(DESTDIR)dest/$$name); \@@\
 
120
                        else                                            \@@\
 
121
                                MakeDirect($(DESTDIR)dest/$$name);      \@@\
 
122
                        fi;                                             \@@\
 
123
                done
 
124
 
 
125
#if     HasSymLinks
 
126
#define InstallAliases() set -x;                                        \@@\
 
127
        cd $(DESTDIR)$(MYLIBDIR)/contexts;                              \@@\
 
128
                sed -e '/^$$/d' -e '/^#/d' @Aliases |                   \@@\
 
129
                while read real aliases;                                \@@\
 
130
                do                                                      \@@\
 
131
                        for i in $$aliases;                             \@@\
 
132
                        do                                              \@@\
 
133
                                $(RM) $$i;                              \@@\
 
134
                                $(LN) $$real $$i;                       \@@\
 
135
                                $(RM) $(DESTDIR)$(MYLIBDIR)/commands/$$i; \@@\
 
136
                                $(LN) $$real $(DESTDIR)$(MYLIBDIR)/commands/$$i; \@@\
 
137
                        done;                                           \@@\
 
138
                done;                                                   \@@\
 
139
                rm @Aliases
 
140
#else
 
141
#define InstallAliases()                                                \@@\
 
142
        echo "Sorry:  don't yet know how to install aliases without symlinks"
 
143
#endif
 
144
 
 
145
install::
 
146
        Recurse(commands,$(MYLIBDIR),FilterCommand)
 
147
        Recurse(contexts,$(MYLIBDIR),FilterContext)
 
148
        InstallAliases()
 
149
 
 
150
InstallManPage(rstart,$(MANDIR))
 
151
InstallManPage(rstartd,$(MANDIR))
 
152
 
 
153
XCOMM # Turning this on makes the server look up host names in $DISPLAY and
 
154
XCOMM # substitute IP addresses.  (ODT v1 X clients can't look names up in
 
155
XCOMM # DNS.)
 
156
XCOMM #CFLAGS=-DODT1_DISPLAY_HACK
 
157
 
 
158
LinkConfDirectory(rstart,.,rstart,.)
 
159