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

« back to all changes in this revision

Viewing changes to unix/xc/config/cf/OpenBSDLib.rules

  • 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 $OpenBSD: OpenBSDLib.rules,v 1.1 2000/10/09 20:43:58 matthieu Exp $
 
2
 
 
3
 
 
4
 
 
5
 
 
6
/*
 
7
 * OpenBSD shared library rules
 
8
 */
 
9
 
 
10
XCOMM $XFree86: xc/config/cf/OpenBSDLib.rules,v 1.5 2003/02/17 21:46:44 herrb Exp $
 
11
 
 
12
#ifndef UseElfFormat
 
13
#define UseElfFormat NO
 
14
#endif
 
15
 
 
16
#ifndef HasSharedLibraries
 
17
#define HasSharedLibraries YES
 
18
#endif
 
19
#ifndef ForceNormalLib
 
20
#define ForceNormalLib YES
 
21
#endif
 
22
 
 
23
#ifndef BaseShLibReqs
 
24
#define BaseShLibReqs           /* -lc implied by $(CC) */
 
25
#endif
 
26
 
 
27
#ifndef SharedDataSeparation
 
28
#define SharedDataSeparation NO
 
29
#endif
 
30
#ifndef SharedCodeDef
 
31
#define SharedCodeDef /**/
 
32
#endif
 
33
#ifndef SharedLibraryDef
 
34
#define SharedLibraryDef /**/
 
35
#endif
 
36
#ifndef ShLibIncludeFile
 
37
#define ShLibIncludeFile <OpenBSDLib.tmpl>
 
38
#endif
 
39
#ifndef SharedLibraryLoadFlags
 
40
#define SharedLibraryLoadFlags -shared PositionIndependentCFlags -Wl,-rpath,$(USRLIBDIR)
 
41
#endif
 
42
#ifndef PositionIndependentCFlags
 
43
#define PositionIndependentCFlags -fPIC
 
44
#endif
 
45
#ifndef PositionIndependentCplusplusFlags
 
46
#define PositionIndependentCplusplusFlags -fPIC
 
47
#endif
 
48
#if UseElfFormat
 
49
#ifndef ExtraLoadFlags
 
50
#ifdef UseInstalled
 
51
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
 
52
#else
 
53
#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR)
 
54
#endif
 
55
#endif
 
56
#endif
 
57
 
 
58
/*
 
59
 * InstallSharedLibrary - generate rules to install the shared library.
 
60
 * NOTE: file must be executable, hence "INSTBINFLAGS"
 
61
 */
 
62
#ifndef InstallSharedLibrary
 
63
#define InstallSharedLibrary(libname,rev,dest)                          @@\
 
64
install:: Concat(lib,libname.so.rev)                                    @@\
 
65
        MakeDir($(DESTDIR)dest)                                         @@\
 
66
        $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest
 
67
#endif /* InstallSharedLibrary */
 
68
 
 
69
/*
 
70
 * InstallSharedLibraryData - generate rules to install the shared library data
 
71
 */
 
72
#ifndef InstallSharedLibraryData
 
73
#define InstallSharedLibraryData(libname,rev,dest)
 
74
#endif /* InstallSharedLibraryData */
 
75
 
 
76
 
 
77
/*
 
78
 * SharedLibraryTarget - generate rules to create a shared library;
 
79
 * build it into a different name so that we do not hose people by having
 
80
 * the library gone for long periods.
 
81
 */
 
82
#ifndef SharedLibraryTarget
 
83
#ifdef UseInstalled  
 
84
#define LinkBuildSonameLibrary(lib) true
 
85
#else
 
86
#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
 
87
        cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
 
88
#endif
 
89
 
 
90
#define SharedLibraryTarget(libname,rev,solist,down,up)                 @@\
 
91
AllTarget(Concat(lib,libname.so.rev))                                   @@\
 
92
                                                                        @@\
 
93
Concat(lib,libname.so.rev):  solist                                     @@\
 
94
        $(RM) $@~                                                       @@\
 
95
        set -x; \                                                       @@\
 
96
                (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$@\ @@\
 
97
                solist $(REQUIREDLIBS) BaseShLibReqs);                  @@\
 
98
                LinkBuildSonameLibrary($@)                              @@\
 
99
        $(RM) $@                                                        @@\
 
100
        $(MV) $@~ $@                                                    @@\
 
101
                                                                        @@\
 
102
clean::                                                                 @@\
 
103
        $(RM) Concat(lib,libname.so.rev)
 
104
 
 
105
#endif /* SharedLibraryTarget */
 
106
 
 
107
 
 
108
/*
 
109
 * SharedDepLibraryTarget - generate rules to create a shared library.
 
110
 */
 
111
#ifndef SharedDepLibraryTarget
 
112
#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)      @@\
 
113
AllTarget(Concat(lib,libname.so.rev))                                   @@\
 
114
                                                                        @@\
 
115
Concat(lib,libname.so.rev):  deplist $(EXTRALIBRARYDEPS)                @@\
 
116
        $(RM) $@~                                                       @@\
 
117
        (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
 
118
        $(RM) $@                                                        @@\
 
119
        $(MV) $@~ $@                                                    @@\
 
120
        LinkBuildLibrary($@)                                            @@\
 
121
                                                                        @@\
 
122
clean::                                                                 @@\
 
123
        $(RM) Concat(lib,libname.so.rev)
 
124
 
 
125
#endif /* SharedDepLibraryTarget */
 
126
 
 
127
#ifndef SharedDepModuleTarget
 
128
#define SharedDepModuleTarget(name,deps,solist)                         @@\
 
129
AllTarget(name)                                                         @@\
 
130
                                                                        @@\
 
131
name: deps                                                              @@\
 
132
        $(RM) $@~                                                       @@\
 
133
        $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)             @@\
 
134
        $(RM) $@                                                        @@\
 
135
        $(MV) $@~ $@                                                    @@\
 
136
                                                                        @@\
 
137
clean::                                                                 @@\
 
138
        $(RM) name
 
139
 
 
140
#endif /* SharedDepModuleTarget */
 
141
 
 
142
/*
 
143
 * SharedLibraryDataTarget - generate rules to create shlib data file;
 
144
 */
 
145
#ifndef SharedLibraryDataTarget
 
146
#define SharedLibraryDataTarget(libname,rev,salist)
 
147
#endif /* SharedLibraryTarget */
 
148
 
 
149
/*
 
150
 * DynamicModuleTarget - build a module to be dynamically loaded
 
151
 */
 
152
#ifdef DynamicModuleTarget
 
153
#undef DynamicModuleTarget
 
154
#define DynamicModuleTarget(module,modlist)                             @@\
 
155
AllTarget(module)                                                       @@\
 
156
                                                                        @@\
 
157
module: modlist                                                         @@\
 
158
        RemoveFile($@)                                                  @@\
 
159
        $(CC) -o $@ $(SHLIBLDFLAGS) modlist                             @@\
 
160
                                                                        @@\
 
161
clean::                                                                 @@\
 
162
        RemoveFile(module)
 
163
#endif /* DynamicModuleTarget */
 
164