Codebase list realmd / 2649de8
Imported Upstream version 0.10 Laurent Bigonville 11 years ago
39 changed file(s) with 418 addition(s) and 1724 deletion(s). Raw diff Collapse all Expand all
00 # Generate automatically. Do not edit.
1
2 commit 56ad086b908cadc75648b804916bf6488061e890
3 Author: Stef Walter <stefw@gnome.org>
4 Date: 2012-10-20
5
6 Release version 0.10
7
8 NEWS | 11 +++++++++++
9 configure.ac | 2 +-
10 2 files changed, 12 insertions(+), 1 deletion(-)
11
12 commit 95a6bbf1b322968df22cba1b1d10b5c3194f97cb
13 Author: Stef Walter <stefw@gnome.org>
14 Date: 2012-10-19
15
16 Send diagnostics from subcommand to client as they come in
17
18 * Route diagnostics from a subcommand like adcli to the caller
19 as they come in from the subprocess.
20
21 https://bugs.freedesktop.org/show_bug.cgi?id=56150
22
23 service/realm-command.c | 14 ++++++--------
24 1 file changed, 6 insertions(+), 8 deletions(-)
25
26 commit 5f551f997865e7b89d80f4104917d2b860b2ed22
27 Author: Stef Walter <stefw@gnome.org>
28 Date: 2012-10-19
29
30 Refactor how discovered realms are handled
31
32 * Sort configured realms first
33 * Pass realm objects up to callers, and only turn into DBus
34 object paths at the last minute before returning value.
35
36 https://bugs.freedesktop.org/show_bug.cgi?id=56135
37
38 service/realm-all-provider.c | 91 ++++++++++++++++++---------------------
39 service/realm-kerberos-provider.c | 18 +++-----
40 service/realm-kerberos.c | 10 +++++
41 service/realm-kerberos.h | 2 +
42 service/realm-provider.c | 52 +++++++++++++++-------
43 service/realm-provider.h | 8 ++--
44 service/realm-samba-provider.c | 18 +++-----
45 service/realm-samba-winbind.c | 2 +-
46 service/realm-sssd-provider.c | 18 +++-----
47 9 files changed, 115 insertions(+), 104 deletions(-)
48
49 commit 79cc673b00c937c59292d6fef8a6bb6ae507c1a3
50 Author: Stef Walter <stefw@gnome.org>
51 Date: 2012-10-19
52
53 Refuse to join a domain if hostname is localhost
54
55 https://bugs.freedesktop.org/show_bug.cgi?id=56145
56
57 service/realm-kerberos.c | 11 +++++++++++
58 1 file changed, 11 insertions(+)
59
60 commit 702aa38a376d8bc174fef7501ad5edbbe6bdd6c5
61 Author: Stef Walter <stefw@gnome.org>
62 Date: 2012-10-19
63
64 Use a proper message when can't claim name on bus
65
66 service/realm-daemon.c | 2 +-
67 1 file changed, 1 insertion(+), 1 deletion(-)
68
69 commit d47aab79f69ebed81181a11575031fd8d9cd10bb
70 Author: Stef Walter <stefw@gnome.org>
71 Date: 2012-10-19
72
73 In realm permit or deny commands, fail when options are invalid.
74
75 http://bugs.freedesktop.org/show_bug.cgi?id=56144
76
77 tools/realm-logins.c | 4 +++-
78 1 file changed, 3 insertions(+), 1 deletion(-)
79
80 commit 1481d4f37ad680f907df13c1ca4af5e3386ecdcf
81 Author: Stef Walter <stefw@gnome.org>
82 Date: 2012-10-19
83
84 Fix samba package names for Fedora changes
85
86 Fedora renamed samba4 packages to just plain 'samba'
87
88 https://bugs.freedesktop.org/show_bug.cgi?id=56166
89
90 service/realmd-redhat.conf | 6 +++---
91 1 file changed, 3 insertions(+), 3 deletions(-)
92
93 commit a437ebb9bcaba7333612d85450087ad057cdc9e2
94 Author: Stef Walter <stefw@gnome.org>
95 Date: 2012-10-19
96
97 Fix typo in realm manual
98
99 https://bugzilla.redhat.com/show_bug.cgi?id=867769
100
101 doc/realm.xml | 2 +-
102 1 file changed, 1 insertion(+), 1 deletion(-)
103
104 commit 1c9cb76c9d324478bbe9a81156ed323a3a802847
105 Author: Stef Walter <stefw@gnome.org>
106 Date: 2012-10-19
107
108 Fix case where base dn in computer-ou doesn't match domain
109
110 When the computer-ou base dn almost matches the domain, but not
111 quite we were letting it through. Catch this case completely and test.
112
113 https://bugs.freedesktop.org/show_bug.cgi?id=56162
114
115 service/realm-samba-util.c | 2 +-
116 tests/test-samba-ou-format.c | 2 ++
117 2 files changed, 3 insertions(+), 1 deletion(-)
118
119 commit 530e1ce7c827d5e640dcc96b9f4f3a83c3dc90e3
120 Author: Stef Walter <stefw@gnome.org>
121 Date: 2012-10-19
122
123 Don't pass empty computer-ou to net command
124
125 When computer-ou argument is empty, don't build a createcomputer=
126 argument for 'net ads join' with nothing in it. Just skip.
127
128 https://bugs.freedesktop.org/show_bug.cgi?id=56162
129
130 service/realm-samba-enroll.c | 3 ++-
131 1 file changed, 2 insertions(+), 1 deletion(-)
132
133 commit e2475b67a1452ad2963f0fd29f3b3c95ed21ded7
134 Author: Stef Walter <stefw@gnome.org>
135 Date: 2012-10-19
136
137 Don't crash when computer-ou is empty
138
139 If 'computer-ou' either in the realmd.conf file or join argument
140 is empty, then realmd was crashing.
141
142 Don't pass empty strings to ldap_str2dn, which then gets confusing.
143
144 https://bugs.freedesktop.org/show_bug.cgi?id=56162
145
146 service/realm-samba-util.c | 6 ++++++
147 tests/test-samba-ou-format.c | 6 +++++-
148 2 files changed, 11 insertions(+), 1 deletion(-)
149
150 commit 9832bb1859b50ba6eeaacce3fc2f6f0fc17b913d
151 Author: Stef Walter <stefw@gnome.org>
152 Date: 2012-10-19
153
154 Fix problem where daemon goes away unexpectedly
155
156 Due to incorrect matching of DBus method calls we were going away
157 unexpectedly even though we still had clients.
158
159 https://bugs.freedesktop.org/show_bug.cgi?id=56165
160
161 service/realm-daemon.c | 8 ++++----
162 1 file changed, 4 insertions(+), 4 deletions(-)
163
164 commit c566f157c58c0e4230d6188187bfe70f5878cf58
165 Author: Stef Walter <stefw@gnome.org>
166 Date: 2012-10-19
167
168 Better debug messages for daemon lifetime
169
170 https://bugs.freedesktop.org/show_bug.cgi?id=56165
171
172 service/realm-daemon.c | 5 +++++
173 1 file changed, 5 insertions(+)
1174
2175 commit a39fb7aa7289ba51c81a62f707c0c27c1de05038
3176 Author: Stef Walter <stefw@gnome.org>
4949 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
5050 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
5151 $(top_srcdir)/Makefile.decl $(top_srcdir)/configure AUTHORS \
52 COPYING ChangeLog INSTALL NEWS compile config.guess depcomp \
53 install-sh missing
52 COPYING ChangeLog INSTALL NEWS compile depcomp install-sh \
53 missing
5454 subdir = .
5555 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5656 am__aclocal_m4_deps = $(top_srcdir)/build/m4/gtk-doc.m4 \
0 0.10
1 * Send diagnostics from subcommand to client as they come in
2 * Return configured realms back to callers
3 * Refuse to join a domain if hostname is localhost
4 * In realm permit or deny commands, fail when options are invalid
5 * Fix samba package names for Fedora changes
6 * Fix typo in realm manual
7 * Fix case where base dn in computer-ou doesn't match domain
8 * Don't crash when computer-ou is empty
9 * Fix problem where daemon goes away unexpectedly
10
011 0.9
112 * Add support for deconfiguring a realm without removing computer account
213 * Cleanup the krb5.keytab from realmd itself, rather than relying on samba
+0
-1530
config.guess less more
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-06-10'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26
27 # Originally written by Per Bothner. Please send patches (context
28 # diff format) to <config-patches@gnu.org> and include a ChangeLog
29 # entry.
30 #
31 # This script attempts to guess a canonical system name similar to
32 # config.sub. If it succeeds, it prints the system name on stdout, and
33 # exits with 0. Otherwise, it exits with 1.
34 #
35 # You can get the latest version of this script from:
36 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
37
38 me=`echo "$0" | sed -e 's,.*/,,'`
39
40 usage="\
41 Usage: $0 [OPTION]
42
43 Output the configuration name of the system \`$me' is run on.
44
45 Operation modes:
46 -h, --help print this help, then exit
47 -t, --time-stamp print date of last modification, then exit
48 -v, --version print version number, then exit
49
50 Report bugs and patches to <config-patches@gnu.org>."
51
52 version="\
53 GNU config.guess ($timestamp)
54
55 Originally written by Per Bothner.
56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
57 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
58 Free Software Foundation, Inc.
59
60 This is free software; see the source for copying conditions. There is NO
61 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
62
63 help="
64 Try \`$me --help' for more information."
65
66 # Parse command line
67 while test $# -gt 0 ; do
68 case $1 in
69 --time-stamp | --time* | -t )
70 echo "$timestamp" ; exit ;;
71 --version | -v )
72 echo "$version" ; exit ;;
73 --help | --h* | -h )
74 echo "$usage"; exit ;;
75 -- ) # Stop option processing
76 shift; break ;;
77 - ) # Use stdin as input.
78 break ;;
79 -* )
80 echo "$me: invalid option $1$help" >&2
81 exit 1 ;;
82 * )
83 break ;;
84 esac
85 done
86
87 if test $# != 0; then
88 echo "$me: too many arguments$help" >&2
89 exit 1
90 fi
91
92 trap 'exit 1' 1 2 15
93
94 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
95 # compiler to aid in system detection is discouraged as it requires
96 # temporary files to be created and, as you can see below, it is a
97 # headache to deal with in a portable fashion.
98
99 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
100 # use `HOST_CC' if defined, but it is deprecated.
101
102 # Portable tmp directory creation inspired by the Autoconf team.
103
104 set_cc_for_build='
105 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
106 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
107 : ${TMPDIR=/tmp} ;
108 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
109 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
110 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
111 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
112 dummy=$tmp/dummy ;
113 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
114 case $CC_FOR_BUILD,$HOST_CC,$CC in
115 ,,) echo "int x;" > $dummy.c ;
116 for c in cc gcc c89 c99 ; do
117 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
118 CC_FOR_BUILD="$c"; break ;
119 fi ;
120 done ;
121 if test x"$CC_FOR_BUILD" = x ; then
122 CC_FOR_BUILD=no_compiler_found ;
123 fi
124 ;;
125 ,,*) CC_FOR_BUILD=$CC ;;
126 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
127 esac ; set_cc_for_build= ;'
128
129 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
130 # (ghazi@noc.rutgers.edu 1994-08-24)
131 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
132 PATH=$PATH:/.attbin ; export PATH
133 fi
134
135 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
136 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
137 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
138 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
139
140 # Note: order is significant - the case branches are not exclusive.
141
142 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
143 *:NetBSD:*:*)
144 # NetBSD (nbsd) targets should (where applicable) match one or
145 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
146 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
147 # switched to ELF, *-*-netbsd* would select the old
148 # object file format. This provides both forward
149 # compatibility and a consistent mechanism for selecting the
150 # object file format.
151 #
152 # Note: NetBSD doesn't particularly care about the vendor
153 # portion of the name. We always set it to "unknown".
154 sysctl="sysctl -n hw.machine_arch"
155 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
156 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
157 case "${UNAME_MACHINE_ARCH}" in
158 armeb) machine=armeb-unknown ;;
159 arm*) machine=arm-unknown ;;
160 sh3el) machine=shl-unknown ;;
161 sh3eb) machine=sh-unknown ;;
162 sh5el) machine=sh5le-unknown ;;
163 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
164 esac
165 # The Operating System including object format, if it has switched
166 # to ELF recently, or will in the future.
167 case "${UNAME_MACHINE_ARCH}" in
168 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
169 eval $set_cc_for_build
170 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
171 | grep -q __ELF__
172 then
173 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
174 # Return netbsd for either. FIX?
175 os=netbsd
176 else
177 os=netbsdelf
178 fi
179 ;;
180 *)
181 os=netbsd
182 ;;
183 esac
184 # The OS release
185 # Debian GNU/NetBSD machines have a different userland, and
186 # thus, need a distinct triplet. However, they do not need
187 # kernel version information, so it can be replaced with a
188 # suitable tag, in the style of linux-gnu.
189 case "${UNAME_VERSION}" in
190 Debian*)
191 release='-gnu'
192 ;;
193 *)
194 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
195 ;;
196 esac
197 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
198 # contains redundant information, the shorter form:
199 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
200 echo "${machine}-${os}${release}"
201 exit ;;
202 *:OpenBSD:*:*)
203 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
204 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
205 exit ;;
206 *:ekkoBSD:*:*)
207 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208 exit ;;
209 *:SolidBSD:*:*)
210 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
211 exit ;;
212 macppc:MirBSD:*:*)
213 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
214 exit ;;
215 *:MirBSD:*:*)
216 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
217 exit ;;
218 alpha:OSF1:*:*)
219 case $UNAME_RELEASE in
220 *4.0)
221 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
222 ;;
223 *5.*)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
225 ;;
226 esac
227 # According to Compaq, /usr/sbin/psrinfo has been available on
228 # OSF/1 and Tru64 systems produced since 1995. I hope that
229 # covers most systems running today. This code pipes the CPU
230 # types through head -n 1, so we only detect the type of CPU 0.
231 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
232 case "$ALPHA_CPU_TYPE" in
233 "EV4 (21064)")
234 UNAME_MACHINE="alpha" ;;
235 "EV4.5 (21064)")
236 UNAME_MACHINE="alpha" ;;
237 "LCA4 (21066/21068)")
238 UNAME_MACHINE="alpha" ;;
239 "EV5 (21164)")
240 UNAME_MACHINE="alphaev5" ;;
241 "EV5.6 (21164A)")
242 UNAME_MACHINE="alphaev56" ;;
243 "EV5.6 (21164PC)")
244 UNAME_MACHINE="alphapca56" ;;
245 "EV5.7 (21164PC)")
246 UNAME_MACHINE="alphapca57" ;;
247 "EV6 (21264)")
248 UNAME_MACHINE="alphaev6" ;;
249 "EV6.7 (21264A)")
250 UNAME_MACHINE="alphaev67" ;;
251 "EV6.8CB (21264C)")
252 UNAME_MACHINE="alphaev68" ;;
253 "EV6.8AL (21264B)")
254 UNAME_MACHINE="alphaev68" ;;
255 "EV6.8CX (21264D)")
256 UNAME_MACHINE="alphaev68" ;;
257 "EV6.9A (21264/EV69A)")
258 UNAME_MACHINE="alphaev69" ;;
259 "EV7 (21364)")
260 UNAME_MACHINE="alphaev7" ;;
261 "EV7.9 (21364A)")
262 UNAME_MACHINE="alphaev79" ;;
263 esac
264 # A Pn.n version is a patched version.
265 # A Vn.n version is a released version.
266 # A Tn.n version is a released field test version.
267 # A Xn.n version is an unreleased experimental baselevel.
268 # 1.2 uses "1.2" for uname -r.
269 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
270 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
271 exitcode=$?
272 trap '' 0
273 exit $exitcode ;;
274 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem?
276 # Should we change UNAME_MACHINE based on the output of uname instead
277 # of the specific Alpha model?
278 echo alpha-pc-interix
279 exit ;;
280 21064:Windows_NT:50:3)
281 echo alpha-dec-winnt3.5
282 exit ;;
283 Amiga*:UNIX_System_V:4.0:*)
284 echo m68k-unknown-sysv4
285 exit ;;
286 *:[Aa]miga[Oo][Ss]:*:*)
287 echo ${UNAME_MACHINE}-unknown-amigaos
288 exit ;;
289 *:[Mm]orph[Oo][Ss]:*:*)
290 echo ${UNAME_MACHINE}-unknown-morphos
291 exit ;;
292 *:OS/390:*:*)
293 echo i370-ibm-openedition
294 exit ;;
295 *:z/VM:*:*)
296 echo s390-ibm-zvmoe
297 exit ;;
298 *:OS400:*:*)
299 echo powerpc-ibm-os400
300 exit ;;
301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302 echo arm-acorn-riscix${UNAME_RELEASE}
303 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*)
305 echo arm-unknown-riscos
306 exit ;;
307 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308 echo hppa1.1-hitachi-hiuxmpp
309 exit ;;
310 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
311 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
312 if test "`(/bin/universe) 2>/dev/null`" = att ; then
313 echo pyramid-pyramid-sysv3
314 else
315 echo pyramid-pyramid-bsd
316 fi
317 exit ;;
318 NILE*:*:*:dcosx)
319 echo pyramid-pyramid-svr4
320 exit ;;
321 DRS?6000:unix:4.0:6*)
322 echo sparc-icl-nx6
323 exit ;;
324 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
325 case `/usr/bin/uname -p` in
326 sparc) echo sparc-icl-nx7; exit ;;
327 esac ;;
328 s390x:SunOS:*:*)
329 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;;
331 sun4H:SunOS:5.*:*)
332 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333 exit ;;
334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341 eval $set_cc_for_build
342 SUN_ARCH="i386"
343 # If there is a compiler, see if it is configured for 64-bit objects.
344 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345 # This test works for both compilers.
346 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349 grep IS_64BIT_ARCH >/dev/null
350 then
351 SUN_ARCH="x86_64"
352 fi
353 fi
354 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 sun4*:SunOS:6*:*)
357 # According to config.sub, this is the proper way to canonicalize
358 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
359 # it's likely to be more like Solaris than SunOS4.
360 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
361 exit ;;
362 sun4*:SunOS:*:*)
363 case "`/usr/bin/arch -k`" in
364 Series*|S4*)
365 UNAME_RELEASE=`uname -v`
366 ;;
367 esac
368 # Japanese Language versions have a version number like `4.1.3-JL'.
369 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
370 exit ;;
371 sun3*:SunOS:*:*)
372 echo m68k-sun-sunos${UNAME_RELEASE}
373 exit ;;
374 sun*:*:4.2BSD:*)
375 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
376 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
377 case "`/bin/arch`" in
378 sun3)
379 echo m68k-sun-sunos${UNAME_RELEASE}
380 ;;
381 sun4)
382 echo sparc-sun-sunos${UNAME_RELEASE}
383 ;;
384 esac
385 exit ;;
386 aushp:SunOS:*:*)
387 echo sparc-auspex-sunos${UNAME_RELEASE}
388 exit ;;
389 # The situation for MiNT is a little confusing. The machine name
390 # can be virtually everything (everything which is not
391 # "atarist" or "atariste" at least should have a processor
392 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
393 # to the lowercase version "mint" (or "freemint"). Finally
394 # the system name "TOS" denotes a system which is actually not
395 # MiNT. But MiNT is downward compatible to TOS, so this should
396 # be no problem.
397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398 echo m68k-atari-mint${UNAME_RELEASE}
399 exit ;;
400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401 echo m68k-atari-mint${UNAME_RELEASE}
402 exit ;;
403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404 echo m68k-atari-mint${UNAME_RELEASE}
405 exit ;;
406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;;
409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;;
412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;;
415 m68k:machten:*:*)
416 echo m68k-apple-machten${UNAME_RELEASE}
417 exit ;;
418 powerpc:machten:*:*)
419 echo powerpc-apple-machten${UNAME_RELEASE}
420 exit ;;
421 RISC*:Mach:*:*)
422 echo mips-dec-mach_bsd4.3
423 exit ;;
424 RISC*:ULTRIX:*:*)
425 echo mips-dec-ultrix${UNAME_RELEASE}
426 exit ;;
427 VAX*:ULTRIX*:*:*)
428 echo vax-dec-ultrix${UNAME_RELEASE}
429 exit ;;
430 2020:CLIX:*:* | 2430:CLIX:*:*)
431 echo clipper-intergraph-clix${UNAME_RELEASE}
432 exit ;;
433 mips:*:*:UMIPS | mips:*:*:RISCos)
434 eval $set_cc_for_build
435 sed 's/^ //' << EOF >$dummy.c
436 #ifdef __cplusplus
437 #include <stdio.h> /* for printf() prototype */
438 int main (int argc, char *argv[]) {
439 #else
440 int main (argc, argv) int argc; char *argv[]; {
441 #endif
442 #if defined (host_mips) && defined (MIPSEB)
443 #if defined (SYSTYPE_SYSV)
444 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
445 #endif
446 #if defined (SYSTYPE_SVR4)
447 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
448 #endif
449 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
450 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
451 #endif
452 #endif
453 exit (-1);
454 }
455 EOF
456 $CC_FOR_BUILD -o $dummy $dummy.c &&
457 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
458 SYSTEM_NAME=`$dummy $dummyarg` &&
459 { echo "$SYSTEM_NAME"; exit; }
460 echo mips-mips-riscos${UNAME_RELEASE}
461 exit ;;
462 Motorola:PowerMAX_OS:*:*)
463 echo powerpc-motorola-powermax
464 exit ;;
465 Motorola:*:4.3:PL8-*)
466 echo powerpc-harris-powermax
467 exit ;;
468 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469 echo powerpc-harris-powermax
470 exit ;;
471 Night_Hawk:Power_UNIX:*:*)
472 echo powerpc-harris-powerunix
473 exit ;;
474 m88k:CX/UX:7*:*)
475 echo m88k-harris-cxux7
476 exit ;;
477 m88k:*:4*:R4*)
478 echo m88k-motorola-sysv4
479 exit ;;
480 m88k:*:3*:R3*)
481 echo m88k-motorola-sysv3
482 exit ;;
483 AViiON:dgux:*:*)
484 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487 then
488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489 [ ${TARGET_BINARY_INTERFACE}x = x ]
490 then
491 echo m88k-dg-dgux${UNAME_RELEASE}
492 else
493 echo m88k-dg-dguxbcs${UNAME_RELEASE}
494 fi
495 else
496 echo i586-dg-dgux${UNAME_RELEASE}
497 fi
498 exit ;;
499 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500 echo m88k-dolphin-sysv3
501 exit ;;
502 M88*:*:R3*:*)
503 # Delta 88k system running SVR3
504 echo m88k-motorola-sysv3
505 exit ;;
506 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507 echo m88k-tektronix-sysv3
508 exit ;;
509 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510 echo m68k-tektronix-bsd
511 exit ;;
512 *:IRIX*:*:*)
513 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
514 exit ;;
515 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
516 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
517 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
518 i*86:AIX:*:*)
519 echo i386-ibm-aix
520 exit ;;
521 ia64:AIX:*:*)
522 if [ -x /usr/bin/oslevel ] ; then
523 IBM_REV=`/usr/bin/oslevel`
524 else
525 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526 fi
527 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
528 exit ;;
529 *:AIX:2:3)
530 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531 eval $set_cc_for_build
532 sed 's/^ //' << EOF >$dummy.c
533 #include <sys/systemcfg.h>
534
535 main()
536 {
537 if (!__power_pc())
538 exit(1);
539 puts("powerpc-ibm-aix3.2.5");
540 exit(0);
541 }
542 EOF
543 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
544 then
545 echo "$SYSTEM_NAME"
546 else
547 echo rs6000-ibm-aix3.2.5
548 fi
549 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
550 echo rs6000-ibm-aix3.2.4
551 else
552 echo rs6000-ibm-aix3.2
553 fi
554 exit ;;
555 *:AIX:*:[4567])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000
559 else
560 IBM_ARCH=powerpc
561 fi
562 if [ -x /usr/bin/oslevel ] ; then
563 IBM_REV=`/usr/bin/oslevel`
564 else
565 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
566 fi
567 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
568 exit ;;
569 *:AIX:*:*)
570 echo rs6000-ibm-aix
571 exit ;;
572 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
573 echo romp-ibm-bsd4.4
574 exit ;;
575 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
576 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
577 exit ;; # report: romp-ibm BSD 4.3
578 *:BOSX:*:*)
579 echo rs6000-bull-bosx
580 exit ;;
581 DPX/2?00:B.O.S.:*:*)
582 echo m68k-bull-sysv3
583 exit ;;
584 9000/[34]??:4.3bsd:1.*:*)
585 echo m68k-hp-bsd
586 exit ;;
587 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
588 echo m68k-hp-bsd4.4
589 exit ;;
590 9000/[34678]??:HP-UX:*:*)
591 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
592 case "${UNAME_MACHINE}" in
593 9000/31? ) HP_ARCH=m68000 ;;
594 9000/[34]?? ) HP_ARCH=m68k ;;
595 9000/[678][0-9][0-9])
596 if [ -x /usr/bin/getconf ]; then
597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;;
606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
607 esac ;;
608 esac
609 fi
610 if [ "${HP_ARCH}" = "" ]; then
611 eval $set_cc_for_build
612 sed 's/^ //' << EOF >$dummy.c
613
614 #define _HPUX_SOURCE
615 #include <stdlib.h>
616 #include <unistd.h>
617
618 int main ()
619 {
620 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif
623 long cpu = sysconf (_SC_CPU_VERSION);
624
625 switch (cpu)
626 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS)
631 switch (bits)
632 {
633 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break;
636 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break;
639 #endif
640 default: puts ("hppa1.0"); break;
641 }
642 exit (0);
643 }
644 EOF
645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646 test -z "$HP_ARCH" && HP_ARCH=hppa
647 fi ;;
648 esac
649 if [ ${HP_ARCH} = "hppa2.0w" ]
650 then
651 eval $set_cc_for_build
652
653 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
654 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
655 # generating 64-bit code. GNU and HP use different nomenclature:
656 #
657 # $ CC_FOR_BUILD=cc ./config.guess
658 # => hppa2.0w-hp-hpux11.23
659 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
660 # => hppa64-hp-hpux11.23
661
662 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
663 grep -q __LP64__
664 then
665 HP_ARCH="hppa2.0w"
666 else
667 HP_ARCH="hppa64"
668 fi
669 fi
670 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
671 exit ;;
672 ia64:HP-UX:*:*)
673 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
674 echo ia64-hp-hpux${HPUX_REV}
675 exit ;;
676 3050*:HI-UX:*:*)
677 eval $set_cc_for_build
678 sed 's/^ //' << EOF >$dummy.c
679 #include <unistd.h>
680 int
681 main ()
682 {
683 long cpu = sysconf (_SC_CPU_VERSION);
684 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
685 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
686 results, however. */
687 if (CPU_IS_PA_RISC (cpu))
688 {
689 switch (cpu)
690 {
691 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
692 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
693 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
694 default: puts ("hppa-hitachi-hiuxwe2"); break;
695 }
696 }
697 else if (CPU_IS_HP_MC68K (cpu))
698 puts ("m68k-hitachi-hiuxwe2");
699 else puts ("unknown-hitachi-hiuxwe2");
700 exit (0);
701 }
702 EOF
703 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
704 { echo "$SYSTEM_NAME"; exit; }
705 echo unknown-hitachi-hiuxwe2
706 exit ;;
707 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
708 echo hppa1.1-hp-bsd
709 exit ;;
710 9000/8??:4.3bsd:*:*)
711 echo hppa1.0-hp-bsd
712 exit ;;
713 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
714 echo hppa1.0-hp-mpeix
715 exit ;;
716 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
717 echo hppa1.1-hp-osf
718 exit ;;
719 hp8??:OSF1:*:*)
720 echo hppa1.0-hp-osf
721 exit ;;
722 i*86:OSF1:*:*)
723 if [ -x /usr/sbin/sysversion ] ; then
724 echo ${UNAME_MACHINE}-unknown-osf1mk
725 else
726 echo ${UNAME_MACHINE}-unknown-osf1
727 fi
728 exit ;;
729 parisc*:Lites*:*:*)
730 echo hppa1.1-hp-lites
731 exit ;;
732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733 echo c1-convex-bsd
734 exit ;;
735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736 if getsysinfo -f scalar_acc
737 then echo c32-convex-bsd
738 else echo c2-convex-bsd
739 fi
740 exit ;;
741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742 echo c34-convex-bsd
743 exit ;;
744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745 echo c38-convex-bsd
746 exit ;;
747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748 echo c4-convex-bsd
749 exit ;;
750 CRAY*Y-MP:*:*:*)
751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit ;;
753 CRAY*[A-Z]90:*:*:*)
754 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
755 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
756 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
757 -e 's/\.[^.]*$/.X/'
758 exit ;;
759 CRAY*TS:*:*:*)
760 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
761 exit ;;
762 CRAY*T3E:*:*:*)
763 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
764 exit ;;
765 CRAY*SV1:*:*:*)
766 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
767 exit ;;
768 *:UNICOS/mp:*:*)
769 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770 exit ;;
771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;;
777 5000:UNIX_System_V:4.*:*)
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;;
782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784 exit ;;
785 sparc*:BSD/OS:*:*)
786 echo sparc-unknown-bsdi${UNAME_RELEASE}
787 exit ;;
788 *:BSD/OS:*:*)
789 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790 exit ;;
791 *:FreeBSD:*:*)
792 UNAME_PROCESSOR=`/usr/bin/uname -p`
793 case ${UNAME_PROCESSOR} in
794 amd64)
795 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
796 *)
797 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 esac
799 exit ;;
800 i*:CYGWIN*:*)
801 echo ${UNAME_MACHINE}-pc-cygwin
802 exit ;;
803 *:MINGW*:*)
804 echo ${UNAME_MACHINE}-pc-mingw32
805 exit ;;
806 i*:MSYS*:*)
807 echo ${UNAME_MACHINE}-pc-msys
808 exit ;;
809 i*:windows32*:*)
810 # uname -m includes "-pc" on this system.
811 echo ${UNAME_MACHINE}-mingw32
812 exit ;;
813 i*:PW*:*)
814 echo ${UNAME_MACHINE}-pc-pw32
815 exit ;;
816 *:Interix*:*)
817 case ${UNAME_MACHINE} in
818 x86)
819 echo i586-pc-interix${UNAME_RELEASE}
820 exit ;;
821 authenticamd | genuineintel | EM64T)
822 echo x86_64-unknown-interix${UNAME_RELEASE}
823 exit ;;
824 IA64)
825 echo ia64-unknown-interix${UNAME_RELEASE}
826 exit ;;
827 esac ;;
828 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
829 echo i${UNAME_MACHINE}-pc-mks
830 exit ;;
831 8664:Windows_NT:*)
832 echo x86_64-pc-mks
833 exit ;;
834 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
835 # How do we know it's Interix rather than the generic POSIX subsystem?
836 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
837 # UNAME_MACHINE based on the output of uname instead of i386?
838 echo i586-pc-interix
839 exit ;;
840 i*:UWIN*:*)
841 echo ${UNAME_MACHINE}-pc-uwin
842 exit ;;
843 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
844 echo x86_64-unknown-cygwin
845 exit ;;
846 p*:CYGWIN*:*)
847 echo powerpcle-unknown-cygwin
848 exit ;;
849 prep*:SunOS:5.*:*)
850 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
851 exit ;;
852 *:GNU:*:*)
853 # the GNU system
854 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
855 exit ;;
856 *:GNU/*:*:*)
857 # other systems with GNU libc and userland
858 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
859 exit ;;
860 i*86:Minix:*:*)
861 echo ${UNAME_MACHINE}-pc-minix
862 exit ;;
863 aarch64:Linux:*:*)
864 echo ${UNAME_MACHINE}-unknown-linux-gnu
865 exit ;;
866 aarch64_be:Linux:*:*)
867 UNAME_MACHINE=aarch64_be
868 echo ${UNAME_MACHINE}-unknown-linux-gnu
869 exit ;;
870 alpha:Linux:*:*)
871 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
872 EV5) UNAME_MACHINE=alphaev5 ;;
873 EV56) UNAME_MACHINE=alphaev56 ;;
874 PCA56) UNAME_MACHINE=alphapca56 ;;
875 PCA57) UNAME_MACHINE=alphapca56 ;;
876 EV6) UNAME_MACHINE=alphaev6 ;;
877 EV67) UNAME_MACHINE=alphaev67 ;;
878 EV68*) UNAME_MACHINE=alphaev68 ;;
879 esac
880 objdump --private-headers /bin/sh | grep -q ld.so.1
881 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
882 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
883 exit ;;
884 arm*:Linux:*:*)
885 eval $set_cc_for_build
886 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
887 | grep -q __ARM_EABI__
888 then
889 echo ${UNAME_MACHINE}-unknown-linux-gnu
890 else
891 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
892 | grep -q __ARM_PCS_VFP
893 then
894 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
895 else
896 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
897 fi
898 fi
899 exit ;;
900 avr32*:Linux:*:*)
901 echo ${UNAME_MACHINE}-unknown-linux-gnu
902 exit ;;
903 cris:Linux:*:*)
904 echo ${UNAME_MACHINE}-axis-linux-gnu
905 exit ;;
906 crisv32:Linux:*:*)
907 echo ${UNAME_MACHINE}-axis-linux-gnu
908 exit ;;
909 frv:Linux:*:*)
910 echo ${UNAME_MACHINE}-unknown-linux-gnu
911 exit ;;
912 hexagon:Linux:*:*)
913 echo ${UNAME_MACHINE}-unknown-linux-gnu
914 exit ;;
915 i*86:Linux:*:*)
916 LIBC=gnu
917 eval $set_cc_for_build
918 sed 's/^ //' << EOF >$dummy.c
919 #ifdef __dietlibc__
920 LIBC=dietlibc
921 #endif
922 EOF
923 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
924 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
925 exit ;;
926 ia64:Linux:*:*)
927 echo ${UNAME_MACHINE}-unknown-linux-gnu
928 exit ;;
929 m32r*:Linux:*:*)
930 echo ${UNAME_MACHINE}-unknown-linux-gnu
931 exit ;;
932 m68*:Linux:*:*)
933 echo ${UNAME_MACHINE}-unknown-linux-gnu
934 exit ;;
935 mips:Linux:*:* | mips64:Linux:*:*)
936 eval $set_cc_for_build
937 sed 's/^ //' << EOF >$dummy.c
938 #undef CPU
939 #undef ${UNAME_MACHINE}
940 #undef ${UNAME_MACHINE}el
941 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
942 CPU=${UNAME_MACHINE}el
943 #else
944 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
945 CPU=${UNAME_MACHINE}
946 #else
947 CPU=
948 #endif
949 #endif
950 EOF
951 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
952 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
953 ;;
954 or32:Linux:*:*)
955 echo ${UNAME_MACHINE}-unknown-linux-gnu
956 exit ;;
957 padre:Linux:*:*)
958 echo sparc-unknown-linux-gnu
959 exit ;;
960 parisc64:Linux:*:* | hppa64:Linux:*:*)
961 echo hppa64-unknown-linux-gnu
962 exit ;;
963 parisc:Linux:*:* | hppa:Linux:*:*)
964 # Look for CPU level
965 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
966 PA7*) echo hppa1.1-unknown-linux-gnu ;;
967 PA8*) echo hppa2.0-unknown-linux-gnu ;;
968 *) echo hppa-unknown-linux-gnu ;;
969 esac
970 exit ;;
971 ppc64:Linux:*:*)
972 echo powerpc64-unknown-linux-gnu
973 exit ;;
974 ppc:Linux:*:*)
975 echo powerpc-unknown-linux-gnu
976 exit ;;
977 s390:Linux:*:* | s390x:Linux:*:*)
978 echo ${UNAME_MACHINE}-ibm-linux
979 exit ;;
980 sh64*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-gnu
982 exit ;;
983 sh*:Linux:*:*)
984 echo ${UNAME_MACHINE}-unknown-linux-gnu
985 exit ;;
986 sparc:Linux:*:* | sparc64:Linux:*:*)
987 echo ${UNAME_MACHINE}-unknown-linux-gnu
988 exit ;;
989 tile*:Linux:*:*)
990 echo ${UNAME_MACHINE}-unknown-linux-gnu
991 exit ;;
992 vax:Linux:*:*)
993 echo ${UNAME_MACHINE}-dec-linux-gnu
994 exit ;;
995 x86_64:Linux:*:*)
996 echo ${UNAME_MACHINE}-unknown-linux-gnu
997 exit ;;
998 xtensa*:Linux:*:*)
999 echo ${UNAME_MACHINE}-unknown-linux-gnu
1000 exit ;;
1001 i*86:DYNIX/ptx:4*:*)
1002 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1003 # earlier versions are messed up and put the nodename in both
1004 # sysname and nodename.
1005 echo i386-sequent-sysv4
1006 exit ;;
1007 i*86:UNIX_SV:4.2MP:2.*)
1008 # Unixware is an offshoot of SVR4, but it has its own version
1009 # number series starting with 2...
1010 # I am not positive that other SVR4 systems won't match this,
1011 # I just have to hope. -- rms.
1012 # Use sysv4.2uw... so that sysv4* matches it.
1013 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1014 exit ;;
1015 i*86:OS/2:*:*)
1016 # If we were able to find `uname', then EMX Unix compatibility
1017 # is probably installed.
1018 echo ${UNAME_MACHINE}-pc-os2-emx
1019 exit ;;
1020 i*86:XTS-300:*:STOP)
1021 echo ${UNAME_MACHINE}-unknown-stop
1022 exit ;;
1023 i*86:atheos:*:*)
1024 echo ${UNAME_MACHINE}-unknown-atheos
1025 exit ;;
1026 i*86:syllable:*:*)
1027 echo ${UNAME_MACHINE}-pc-syllable
1028 exit ;;
1029 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1030 echo i386-unknown-lynxos${UNAME_RELEASE}
1031 exit ;;
1032 i*86:*DOS:*:*)
1033 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1034 exit ;;
1035 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1036 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1037 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1038 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1039 else
1040 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1041 fi
1042 exit ;;
1043 i*86:*:5:[678]*)
1044 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1045 case `/bin/uname -X | grep "^Machine"` in
1046 *486*) UNAME_MACHINE=i486 ;;
1047 *Pentium) UNAME_MACHINE=i586 ;;
1048 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1049 esac
1050 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1051 exit ;;
1052 i*86:*:3.2:*)
1053 if test -f /usr/options/cb.name; then
1054 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1055 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1056 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1057 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1058 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1059 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1060 && UNAME_MACHINE=i586
1061 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1062 && UNAME_MACHINE=i686
1063 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1064 && UNAME_MACHINE=i686
1065 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1066 else
1067 echo ${UNAME_MACHINE}-pc-sysv32
1068 fi
1069 exit ;;
1070 pc:*:*:*)
1071 # Left here for compatibility:
1072 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1073 # the processor, so we play safe by assuming i586.
1074 # Note: whatever this is, it MUST be the same as what config.sub
1075 # prints for the "djgpp" host, or else GDB configury will decide that
1076 # this is a cross-build.
1077 echo i586-pc-msdosdjgpp
1078 exit ;;
1079 Intel:Mach:3*:*)
1080 echo i386-pc-mach3
1081 exit ;;
1082 paragon:*:*:*)
1083 echo i860-intel-osf1
1084 exit ;;
1085 i860:*:4.*:*) # i860-SVR4
1086 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1087 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1088 else # Add other i860-SVR4 vendors below as they are discovered.
1089 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1090 fi
1091 exit ;;
1092 mini*:CTIX:SYS*5:*)
1093 # "miniframe"
1094 echo m68010-convergent-sysv
1095 exit ;;
1096 mc68k:UNIX:SYSTEM5:3.51m)
1097 echo m68k-convergent-sysv
1098 exit ;;
1099 M680?0:D-NIX:5.3:*)
1100 echo m68k-diab-dnix
1101 exit ;;
1102 M68*:*:R3V[5678]*:*)
1103 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1104 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1105 OS_REL=''
1106 test -r /etc/.relid \
1107 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1108 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1109 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1110 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1111 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1112 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1113 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1114 && { echo i486-ncr-sysv4; exit; } ;;
1115 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1116 OS_REL='.3'
1117 test -r /etc/.relid \
1118 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1119 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1120 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1121 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1122 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1123 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1124 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1125 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1126 echo m68k-unknown-lynxos${UNAME_RELEASE}
1127 exit ;;
1128 mc68030:UNIX_System_V:4.*:*)
1129 echo m68k-atari-sysv4
1130 exit ;;
1131 TSUNAMI:LynxOS:2.*:*)
1132 echo sparc-unknown-lynxos${UNAME_RELEASE}
1133 exit ;;
1134 rs6000:LynxOS:2.*:*)
1135 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1136 exit ;;
1137 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1138 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1139 exit ;;
1140 SM[BE]S:UNIX_SV:*:*)
1141 echo mips-dde-sysv${UNAME_RELEASE}
1142 exit ;;
1143 RM*:ReliantUNIX-*:*:*)
1144 echo mips-sni-sysv4
1145 exit ;;
1146 RM*:SINIX-*:*:*)
1147 echo mips-sni-sysv4
1148 exit ;;
1149 *:SINIX-*:*:*)
1150 if uname -p 2>/dev/null >/dev/null ; then
1151 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1152 echo ${UNAME_MACHINE}-sni-sysv4
1153 else
1154 echo ns32k-sni-sysv
1155 fi
1156 exit ;;
1157 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1158 # says <Richard.M.Bartel@ccMail.Census.GOV>
1159 echo i586-unisys-sysv4
1160 exit ;;
1161 *:UNIX_System_V:4*:FTX*)
1162 # From Gerald Hewes <hewes@openmarket.com>.
1163 # How about differentiating between stratus architectures? -djm
1164 echo hppa1.1-stratus-sysv4
1165 exit ;;
1166 *:*:*:FTX*)
1167 # From seanf@swdc.stratus.com.
1168 echo i860-stratus-sysv4
1169 exit ;;
1170 i*86:VOS:*:*)
1171 # From Paul.Green@stratus.com.
1172 echo ${UNAME_MACHINE}-stratus-vos
1173 exit ;;
1174 *:VOS:*:*)
1175 # From Paul.Green@stratus.com.
1176 echo hppa1.1-stratus-vos
1177 exit ;;
1178 mc68*:A/UX:*:*)
1179 echo m68k-apple-aux${UNAME_RELEASE}
1180 exit ;;
1181 news*:NEWS-OS:6*:*)
1182 echo mips-sony-newsos6
1183 exit ;;
1184 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1185 if [ -d /usr/nec ]; then
1186 echo mips-nec-sysv${UNAME_RELEASE}
1187 else
1188 echo mips-unknown-sysv${UNAME_RELEASE}
1189 fi
1190 exit ;;
1191 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1192 echo powerpc-be-beos
1193 exit ;;
1194 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1195 echo powerpc-apple-beos
1196 exit ;;
1197 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1198 echo i586-pc-beos
1199 exit ;;
1200 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1201 echo i586-pc-haiku
1202 exit ;;
1203 SX-4:SUPER-UX:*:*)
1204 echo sx4-nec-superux${UNAME_RELEASE}
1205 exit ;;
1206 SX-5:SUPER-UX:*:*)
1207 echo sx5-nec-superux${UNAME_RELEASE}
1208 exit ;;
1209 SX-6:SUPER-UX:*:*)
1210 echo sx6-nec-superux${UNAME_RELEASE}
1211 exit ;;
1212 SX-7:SUPER-UX:*:*)
1213 echo sx7-nec-superux${UNAME_RELEASE}
1214 exit ;;
1215 SX-8:SUPER-UX:*:*)
1216 echo sx8-nec-superux${UNAME_RELEASE}
1217 exit ;;
1218 SX-8R:SUPER-UX:*:*)
1219 echo sx8r-nec-superux${UNAME_RELEASE}
1220 exit ;;
1221 Power*:Rhapsody:*:*)
1222 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1223 exit ;;
1224 *:Rhapsody:*:*)
1225 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1226 exit ;;
1227 *:Darwin:*:*)
1228 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1229 case $UNAME_PROCESSOR in
1230 i386)
1231 eval $set_cc_for_build
1232 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1233 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1234 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1235 grep IS_64BIT_ARCH >/dev/null
1236 then
1237 UNAME_PROCESSOR="x86_64"
1238 fi
1239 fi ;;
1240 unknown) UNAME_PROCESSOR=powerpc ;;
1241 esac
1242 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1243 exit ;;
1244 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1245 UNAME_PROCESSOR=`uname -p`
1246 if test "$UNAME_PROCESSOR" = "x86"; then
1247 UNAME_PROCESSOR=i386
1248 UNAME_MACHINE=pc
1249 fi
1250 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1251 exit ;;
1252 *:QNX:*:4*)
1253 echo i386-pc-qnx
1254 exit ;;
1255 NEO-?:NONSTOP_KERNEL:*:*)
1256 echo neo-tandem-nsk${UNAME_RELEASE}
1257 exit ;;
1258 NSE-*:NONSTOP_KERNEL:*:*)
1259 echo nse-tandem-nsk${UNAME_RELEASE}
1260 exit ;;
1261 NSR-?:NONSTOP_KERNEL:*:*)
1262 echo nsr-tandem-nsk${UNAME_RELEASE}
1263 exit ;;
1264 *:NonStop-UX:*:*)
1265 echo mips-compaq-nonstopux
1266 exit ;;
1267 BS2000:POSIX*:*:*)
1268 echo bs2000-siemens-sysv
1269 exit ;;
1270 DS/*:UNIX_System_V:*:*)
1271 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1272 exit ;;
1273 *:Plan9:*:*)
1274 # "uname -m" is not consistent, so use $cputype instead. 386
1275 # is converted to i386 for consistency with other x86
1276 # operating systems.
1277 if test "$cputype" = "386"; then
1278 UNAME_MACHINE=i386
1279 else
1280 UNAME_MACHINE="$cputype"
1281 fi
1282 echo ${UNAME_MACHINE}-unknown-plan9
1283 exit ;;
1284 *:TOPS-10:*:*)
1285 echo pdp10-unknown-tops10
1286 exit ;;
1287 *:TENEX:*:*)
1288 echo pdp10-unknown-tenex
1289 exit ;;
1290 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1291 echo pdp10-dec-tops20
1292 exit ;;
1293 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1294 echo pdp10-xkl-tops20
1295 exit ;;
1296 *:TOPS-20:*:*)
1297 echo pdp10-unknown-tops20
1298 exit ;;
1299 *:ITS:*:*)
1300 echo pdp10-unknown-its
1301 exit ;;
1302 SEI:*:*:SEIUX)
1303 echo mips-sei-seiux${UNAME_RELEASE}
1304 exit ;;
1305 *:DragonFly:*:*)
1306 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1307 exit ;;
1308 *:*VMS:*:*)
1309 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1310 case "${UNAME_MACHINE}" in
1311 A*) echo alpha-dec-vms ; exit ;;
1312 I*) echo ia64-dec-vms ; exit ;;
1313 V*) echo vax-dec-vms ; exit ;;
1314 esac ;;
1315 *:XENIX:*:SysV)
1316 echo i386-pc-xenix
1317 exit ;;
1318 i*86:skyos:*:*)
1319 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1320 exit ;;
1321 i*86:rdos:*:*)
1322 echo ${UNAME_MACHINE}-pc-rdos
1323 exit ;;
1324 i*86:AROS:*:*)
1325 echo ${UNAME_MACHINE}-pc-aros
1326 exit ;;
1327 x86_64:VMkernel:*:*)
1328 echo ${UNAME_MACHINE}-unknown-esx
1329 exit ;;
1330 esac
1331
1332 #echo '(No uname command or uname output not recognized.)' 1>&2
1333 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1334
1335 eval $set_cc_for_build
1336 cat >$dummy.c <<EOF
1337 #ifdef _SEQUENT_
1338 # include <sys/types.h>
1339 # include <sys/utsname.h>
1340 #endif
1341 main ()
1342 {
1343 #if defined (sony)
1344 #if defined (MIPSEB)
1345 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1346 I don't know.... */
1347 printf ("mips-sony-bsd\n"); exit (0);
1348 #else
1349 #include <sys/param.h>
1350 printf ("m68k-sony-newsos%s\n",
1351 #ifdef NEWSOS4
1352 "4"
1353 #else
1354 ""
1355 #endif
1356 ); exit (0);
1357 #endif
1358 #endif
1359
1360 #if defined (__arm) && defined (__acorn) && defined (__unix)
1361 printf ("arm-acorn-riscix\n"); exit (0);
1362 #endif
1363
1364 #if defined (hp300) && !defined (hpux)
1365 printf ("m68k-hp-bsd\n"); exit (0);
1366 #endif
1367
1368 #if defined (NeXT)
1369 #if !defined (__ARCHITECTURE__)
1370 #define __ARCHITECTURE__ "m68k"
1371 #endif
1372 int version;
1373 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1374 if (version < 4)
1375 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1376 else
1377 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1378 exit (0);
1379 #endif
1380
1381 #if defined (MULTIMAX) || defined (n16)
1382 #if defined (UMAXV)
1383 printf ("ns32k-encore-sysv\n"); exit (0);
1384 #else
1385 #if defined (CMU)
1386 printf ("ns32k-encore-mach\n"); exit (0);
1387 #else
1388 printf ("ns32k-encore-bsd\n"); exit (0);
1389 #endif
1390 #endif
1391 #endif
1392
1393 #if defined (__386BSD__)
1394 printf ("i386-pc-bsd\n"); exit (0);
1395 #endif
1396
1397 #if defined (sequent)
1398 #if defined (i386)
1399 printf ("i386-sequent-dynix\n"); exit (0);
1400 #endif
1401 #if defined (ns32000)
1402 printf ("ns32k-sequent-dynix\n"); exit (0);
1403 #endif
1404 #endif
1405
1406 #if defined (_SEQUENT_)
1407 struct utsname un;
1408
1409 uname(&un);
1410
1411 if (strncmp(un.version, "V2", 2) == 0) {
1412 printf ("i386-sequent-ptx2\n"); exit (0);
1413 }
1414 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1415 printf ("i386-sequent-ptx1\n"); exit (0);
1416 }
1417 printf ("i386-sequent-ptx\n"); exit (0);
1418
1419 #endif
1420
1421 #if defined (vax)
1422 # if !defined (ultrix)
1423 # include <sys/param.h>
1424 # if defined (BSD)
1425 # if BSD == 43
1426 printf ("vax-dec-bsd4.3\n"); exit (0);
1427 # else
1428 # if BSD == 199006
1429 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1430 # else
1431 printf ("vax-dec-bsd\n"); exit (0);
1432 # endif
1433 # endif
1434 # else
1435 printf ("vax-dec-bsd\n"); exit (0);
1436 # endif
1437 # else
1438 printf ("vax-dec-ultrix\n"); exit (0);
1439 # endif
1440 #endif
1441
1442 #if defined (alliant) && defined (i860)
1443 printf ("i860-alliant-bsd\n"); exit (0);
1444 #endif
1445
1446 exit (1);
1447 }
1448 EOF
1449
1450 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1451 { echo "$SYSTEM_NAME"; exit; }
1452
1453 # Apollos put the system type in the environment.
1454
1455 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1456
1457 # Convex versions that predate uname can use getsysinfo(1)
1458
1459 if [ -x /usr/convex/getsysinfo ]
1460 then
1461 case `getsysinfo -f cpu_type` in
1462 c1*)
1463 echo c1-convex-bsd
1464 exit ;;
1465 c2*)
1466 if getsysinfo -f scalar_acc
1467 then echo c32-convex-bsd
1468 else echo c2-convex-bsd
1469 fi
1470 exit ;;
1471 c34*)
1472 echo c34-convex-bsd
1473 exit ;;
1474 c38*)
1475 echo c38-convex-bsd
1476 exit ;;
1477 c4*)
1478 echo c4-convex-bsd
1479 exit ;;
1480 esac
1481 fi
1482
1483 cat >&2 <<EOF
1484 $0: unable to guess system type
1485
1486 This script, last modified $timestamp, has failed to recognize
1487 the operating system you are using. It is advised that you
1488 download the most up to date version of the config scripts from
1489
1490 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1491 and
1492 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1493
1494 If the version you run ($0) is already up to date, please
1495 send the following data and any information you think might be
1496 pertinent to <config-patches@gnu.org> in order to provide the needed
1497 information to handle your system.
1498
1499 config.guess timestamp = $timestamp
1500
1501 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1502 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1503 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1504 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1505
1506 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1507 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1508
1509 hostinfo = `(hostinfo) 2>/dev/null`
1510 /bin/universe = `(/bin/universe) 2>/dev/null`
1511 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1512 /bin/arch = `(/bin/arch) 2>/dev/null`
1513 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1514 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1515
1516 UNAME_MACHINE = ${UNAME_MACHINE}
1517 UNAME_RELEASE = ${UNAME_RELEASE}
1518 UNAME_SYSTEM = ${UNAME_SYSTEM}
1519 UNAME_VERSION = ${UNAME_VERSION}
1520 EOF
1521
1522 exit 1
1523
1524 # Local variables:
1525 # eval: (add-hook 'write-file-hooks 'time-stamp)
1526 # time-stamp-start: "timestamp='"
1527 # time-stamp-format: "%:y-%02m-%02d"
1528 # time-stamp-end: "'"
1529 # End:
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for realmd 0.9.
2 # Generated by GNU Autoconf 2.69 for realmd 0.10.
33 #
44 # Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=realmd>.
55 #
580580 # Identity of this package.
581581 PACKAGE_NAME='realmd'
582582 PACKAGE_TARNAME='realmd'
583 PACKAGE_VERSION='0.9'
584 PACKAGE_STRING='realmd 0.9'
583 PACKAGE_VERSION='0.10'
584 PACKAGE_STRING='realmd 0.10'
585585 PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=realmd'
586586 PACKAGE_URL=''
587587
13841384 # Omit some internal or obsolete options to make the list less imposing.
13851385 # This message is too long to be a string in the A/UX 3.1 sh.
13861386 cat <<_ACEOF
1387 \`configure' configures realmd 0.9 to adapt to many kinds of systems.
1387 \`configure' configures realmd 0.10 to adapt to many kinds of systems.
13881388
13891389 Usage: $0 [OPTION]... [VAR=VALUE]...
13901390
14501450
14511451 if test -n "$ac_init_help"; then
14521452 case $ac_init_help in
1453 short | recursive ) echo "Configuration of realmd 0.9:";;
1453 short | recursive ) echo "Configuration of realmd 0.10:";;
14541454 esac
14551455 cat <<\_ACEOF
14561456
15811581 test -n "$ac_init_help" && exit $ac_status
15821582 if $ac_init_version; then
15831583 cat <<\_ACEOF
1584 realmd configure 0.9
1584 realmd configure 0.10
15851585 generated by GNU Autoconf 2.69
15861586
15871587 Copyright (C) 2012 Free Software Foundation, Inc.
19501950 This file contains any messages produced by compilers while
19511951 running configure, to aid debugging if configure makes a mistake.
19521952
1953 It was created by realmd $as_me 0.9, which was
1953 It was created by realmd $as_me 0.10, which was
19541954 generated by GNU Autoconf 2.69. Invocation command line was
19551955
19561956 $ $0 $@
27782778
27792779 # Define the identity of the package.
27802780 PACKAGE='realmd'
2781 VERSION='0.9'
2781 VERSION='0.10'
27822782
27832783
27842784 cat >>confdefs.h <<_ACEOF
89278927 # report actual input values of CONFIG_FILES etc. instead of their
89288928 # values after options handling.
89298929 ac_log="
8930 This file was extended by realmd $as_me 0.9, which was
8930 This file was extended by realmd $as_me 0.10, which was
89318931 generated by GNU Autoconf 2.69. Invocation command line was
89328932
89338933 CONFIG_FILES = $CONFIG_FILES
89938993 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
89948994 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
89958995 ac_cs_version="\\
8996 realmd config.status 0.9
8996 realmd config.status 0.10
89978997 configured by $0, generated by GNU Autoconf 2.69,
89988998 with options \\"\$ac_cs_config\\"
89998999
00 AC_PREREQ(2.63)
11
2 AC_INIT([realmd], [0.9],
2 AC_INIT([realmd], [0.10],
33 [http://bugs.freedesktop.org/enter_bug.cgi?product=realmd],
44 [realmd])
55
3636 <td valign="top" align="right"></td>
3737 </tr></table></div>
3838 <div class="refsect1">
39 <a name="idp8541248"></a><h2>Properties</h2>
39 <a name="idp5714736"></a><h2>Properties</h2>
4040 <pre class="synopsis">
4141 <a class="link" href="gdbus-org.freedesktop.realmd.Kerberos.html#gdbus-property-org-freedesktop-realmd-Kerberos.RealmName" title='The "RealmName" property'>RealmName</a> readable s
4242 <a class="link" href="gdbus-org.freedesktop.realmd.Kerberos.html#gdbus-property-org-freedesktop-realmd-Kerberos.DomainName" title='The "DomainName" property'>DomainName</a> readable s
4646 </pre>
4747 </div>
4848 <div class="refsect1">
49 <a name="idp9134320"></a><h2>Properties</h2>
49 <a name="idp6873920"></a><h2>Properties</h2>
5050 <pre class="synopsis">
5151 <a class="link" href="gdbus-org.freedesktop.realmd.KerberosMembership.html#gdbus-property-org-freedesktop-realmd-KerberosMembership.SuggestedAdministrator" title='The "SuggestedAdministrator" property'>SuggestedAdministrator</a> readable s
5252 <a class="link" href="gdbus-org.freedesktop.realmd.KerberosMembership.html#gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedJoinCredentials" title='The "SupportedJoinCredentials" property'>SupportedJoinCredentials</a> readable a(ss)
4646 </pre>
4747 </div>
4848 <div class="refsect1">
49 <a name="idp10945232"></a><h2>Properties</h2>
49 <a name="idp8500176"></a><h2>Properties</h2>
5050 <pre class="synopsis">
5151 <a class="link" href="gdbus-org.freedesktop.realmd.Provider.html#gdbus-property-org-freedesktop-realmd-Provider.Name" title='The "Name" property'>Name</a> readable s
5252 <a class="link" href="gdbus-org.freedesktop.realmd.Provider.html#gdbus-property-org-freedesktop-realmd-Provider.Version" title='The "Version" property'>Version</a> readable s
4747 </pre>
4848 </div>
4949 <div class="refsect1">
50 <a name="idp7480416"></a><h2>Properties</h2>
50 <a name="idp6374720"></a><h2>Properties</h2>
5151 <pre class="synopsis">
5252 <a class="link" href="gdbus-org.freedesktop.realmd.Realm.html#gdbus-property-org-freedesktop-realmd-Realm.Name" title='The "Name" property'>Name</a> readable s
5353 <a class="link" href="gdbus-org.freedesktop.realmd.Realm.html#gdbus-property-org-freedesktop-realmd-Realm.Configured" title='The "Configured" property'>Configured</a> readable s
4545 </pre>
4646 </div>
4747 <div class="refsect1">
48 <a name="idp10157408"></a><h2>Signals</h2>
48 <a name="idp8140512"></a><h2>Signals</h2>
4949 <pre class="synopsis">
5050 <a class="link" href="gdbus-org.freedesktop.realmd.Service.html#gdbus-signal-org-freedesktop-realmd-Service.Diagnostics" title='The "Diagnostics" signal'>Diagnostics</a> (s data,
5151 s operation);
3232 By default SSSD is used.</p>
3333 <div class="section">
3434 <div class="titlepage"><div><div><h3 class="title">
35 <a name="idp10880368"></a>Using SSSD with Active Directory</h3></div></div></div>
35 <a name="idp8178992"></a>Using SSSD with Active Directory</h3></div></div></div>
3636 <p><a class="ulink" href="https://fedorahosted.org/sssd/" target="_top">SSSD</a>
3737 provides client software for various kerberos and/or LDAP
3838 directories. Since version 1.9.x it provides good support
5050 </div>
5151 <div class="section">
5252 <div class="titlepage"><div><div><h3 class="title">
53 <a name="idp6592816"></a>Using Winbind with Active Directory</h3></div></div></div>
53 <a name="idp6168432"></a>Using Winbind with Active Directory</h3></div></div></div>
5454 <p>Samba
5555 <a class="ulink" href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html" target="_top">Winbind</a>
5656 provides client software for use with Active Directory.</p>
2525 <dt><span class="section"><a href="guide-active-directory.html#guide-active-directory-discover">Discovering Active Directory domains</a></span></dt>
2626 <dt><span class="section"><a href="guide-active-directory-client.html">Active Directory client software</a></span></dt>
2727 <dd><dl>
28 <dt><span class="section"><a href="guide-active-directory-client.html#idp10880368">Using SSSD with Active Directory</a></span></dt>
29 <dt><span class="section"><a href="guide-active-directory-client.html#idp6592816">Using Winbind with Active Directory</a></span></dt>
28 <dt><span class="section"><a href="guide-active-directory-client.html#idp8178992">Using SSSD with Active Directory</a></span></dt>
29 <dt><span class="section"><a href="guide-active-directory-client.html#idp6168432">Using Winbind with Active Directory</a></span></dt>
3030 </dl></dd>
3131 <dt><span class="section"><a href="guide-active-directory-join.html">Joining an Active Directory domain</a></span></dt>
3232 <dt><span class="section"><a href="guide-active-directory-permit.html">Logins using Domain Accounts</a></span></dt>
3535 <p>Only specify the settings you wish to override.</p>
3636 <div class="section">
3737 <div class="titlepage"><div><div><h3 class="title">
38 <a name="idp9639264"></a>computer-ou</h3></div></div></div>
38 <a name="idp7293920"></a>computer-ou</h3></div></div></div>
3939 <p>Specify this option to create directory computer accounts
4040 in a location other than the default. This currently only works
4141 with Active Directory domains.</p>
2626 specify the settings you wish to override.</p>
2727 <div class="section">
2828 <div class="titlepage"><div><div><h3 class="title">
29 <a name="idp6023568"></a>default-home</h3></div></div></div>
29 <a name="idp8765568"></a>default-home</h3></div></div></div>
3030 <p>Specify the <code class="option">default-home</code> setting in
3131 order to control how to set the home directory for accounts
3232 that have no home directory explicitly set.</p>
5858 </div>
5959 <div class="section">
6060 <div class="titlepage"><div><div><h3 class="title">
61 <a name="idp6557504"></a>default-shell</h3></div></div></div>
61 <a name="idp6097024"></a>default-shell</h3></div></div></div>
6262 <p>Specify the <code class="option">default-shell</code> setting in
6363 order to control how to set the Unix shell for accounts that
6464 have no shell explicitly set.</p>
2323 <a name="guide-configuring"></a>Configuring realmd</h2></div></div></div>
2424 <div class="toc"><dl>
2525 <dt><span class="section"><a href="guide-configuring.html#guide-configuring-active-directory">active-directory</a></span></dt>
26 <dd><dl><dt><span class="section"><a href="guide-configuring.html#idp7104192">default-client</a></span></dt></dl></dd>
26 <dd><dl><dt><span class="section"><a href="guide-configuring.html#idp8618752">default-client</a></span></dt></dl></dd>
2727 <dt><span class="section"><a href="guide-configuring-users.html">user</a></span></dt>
2828 <dd><dl>
29 <dt><span class="section"><a href="guide-configuring-users.html#idp6023568">default-home</a></span></dt>
30 <dt><span class="section"><a href="guide-configuring-users.html#idp6557504">default-shell</a></span></dt>
29 <dt><span class="section"><a href="guide-configuring-users.html#idp8765568">default-home</a></span></dt>
30 <dt><span class="section"><a href="guide-configuring-users.html#idp6097024">default-shell</a></span></dt>
3131 </dl></dd>
3232 <dt><span class="section"><a href="guide-configuring-realm.html">Realm specific settings</a></span></dt>
33 <dd><dl><dt><span class="section"><a href="guide-configuring-realm.html#idp9639264">computer-ou</a></span></dt></dl></dd>
33 <dd><dl><dt><span class="section"><a href="guide-configuring-realm.html#idp7293920">computer-ou</a></span></dt></dl></dd>
3434 </dl></div>
3535 <p><span class="command"><strong>realmd</strong></span> can be tweaked by network administrators
3636 to act in specific ways. This is done by placing settings in a
5050 specify the settings you wish to override.</p>
5151 <div class="section">
5252 <div class="titlepage"><div><div><h3 class="title">
53 <a name="idp7104192"></a>default-client</h3></div></div></div>
53 <a name="idp8618752"></a>default-client</h3></div></div></div>
5454 <p>Specify the <code class="option">default-client</code> setting in
5555 order to control which client software is the preferred default
5656 for use with Active Directory.</p>
2121 <div class="chapter">
2222 <div class="titlepage"><div><div><h2 class="title">
2323 <a name="guide-freeipa"></a>Using with other Kerberos realms</h2></div></div></div>
24 <div class="toc"><dl><dt><span class="section"><a href="guide-freeipa.html#idp8851920">Discovering Kerberos realms</a></span></dt></dl></div>
24 <div class="toc"><dl><dt><span class="section"><a href="guide-freeipa.html#idp5982432">Discovering Kerberos realms</a></span></dt></dl></div>
2525 <p><span class="command"><strong>realmd</strong></span> can discover generic Kerberos realms.
2626 Since there is no standard way to enroll a computer against a Kerberos
2727 server, it is not possible to do this with <span class="command"><strong>realmd</strong></span>.</p>
2828 <div class="section">
2929 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
30 <a name="idp8851920"></a>Discovering Kerberos realms</h2></div></div></div>
30 <a name="idp5982432"></a>Discovering Kerberos realms</h2></div></div></div>
3131 <p><span class="command"><strong>realmd</strong></span> discovers which domains or
3232 realms it can use or configure. It can discover and identify
3333 Kerberos domains by looking up the appropriate DNS SRV
3333 <dt><span class="section"><a href="guide-active-directory.html#guide-active-directory-discover">Discovering Active Directory domains</a></span></dt>
3434 <dt><span class="section"><a href="guide-active-directory-client.html">Active Directory client software</a></span></dt>
3535 <dd><dl>
36 <dt><span class="section"><a href="guide-active-directory-client.html#idp10880368">Using SSSD with Active Directory</a></span></dt>
37 <dt><span class="section"><a href="guide-active-directory-client.html#idp6592816">Using Winbind with Active Directory</a></span></dt>
36 <dt><span class="section"><a href="guide-active-directory-client.html#idp8178992">Using SSSD with Active Directory</a></span></dt>
37 <dt><span class="section"><a href="guide-active-directory-client.html#idp6168432">Using Winbind with Active Directory</a></span></dt>
3838 </dl></dd>
3939 <dt><span class="section"><a href="guide-active-directory-join.html">Joining an Active Directory domain</a></span></dt>
4040 <dt><span class="section"><a href="guide-active-directory-permit.html">Logins using Domain Accounts</a></span></dt>
4141 </dl></dd>
4242 <dt><span class="chapter"><a href="guide-freeipa.html">Using with FreeIPA</a></span></dt>
43 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp9009232">Discovering FreeIPA domains</a></span></dt></dl></dd>
43 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp8001472">Discovering FreeIPA domains</a></span></dt></dl></dd>
4444 <dt><span class="chapter"><a href="guide-freeipa.html">Using with other Kerberos realms</a></span></dt>
45 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp8851920">Discovering Kerberos realms</a></span></dt></dl></dd>
45 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp5982432">Discovering Kerberos realms</a></span></dt></dl></dd>
4646 <dt><span class="chapter"><a href="guide-configuring.html">Configuring realmd</a></span></dt>
4747 <dd><dl>
4848 <dt><span class="section"><a href="guide-configuring.html#guide-configuring-active-directory">active-directory</a></span></dt>
49 <dd><dl><dt><span class="section"><a href="guide-configuring.html#idp7104192">default-client</a></span></dt></dl></dd>
49 <dd><dl><dt><span class="section"><a href="guide-configuring.html#idp8618752">default-client</a></span></dt></dl></dd>
5050 <dt><span class="section"><a href="guide-configuring-users.html">user</a></span></dt>
5151 <dd><dl>
52 <dt><span class="section"><a href="guide-configuring-users.html#idp6023568">default-home</a></span></dt>
53 <dt><span class="section"><a href="guide-configuring-users.html#idp6557504">default-shell</a></span></dt>
52 <dt><span class="section"><a href="guide-configuring-users.html#idp8765568">default-home</a></span></dt>
53 <dt><span class="section"><a href="guide-configuring-users.html#idp6097024">default-shell</a></span></dt>
5454 </dl></dd>
5555 <dt><span class="section"><a href="guide-configuring-realm.html">Realm specific settings</a></span></dt>
56 <dd><dl><dt><span class="section"><a href="guide-configuring-realm.html#idp9639264">computer-ou</a></span></dt></dl></dd>
56 <dd><dl><dt><span class="section"><a href="guide-configuring-realm.html#idp7293920">computer-ou</a></span></dt></dl></dd>
5757 </dl></dd>
5858 <dt><span class="chapter"><a href="guide-integration.html">Integration</a></span></dt>
5959 </dl>
1313 <div class="titlepage">
1414 <div>
1515 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">realmd</p></th></tr></table></div>
16 <div><p class="releaseinfo">for 0.8.1
16 <div><p class="releaseinfo">for 0.9
1717 </p></div>
1818 </div>
1919 <hr>
3030 <dt><span class="section"><a href="guide-active-directory.html#guide-active-directory-discover">Discovering Active Directory domains</a></span></dt>
3131 <dt><span class="section"><a href="guide-active-directory-client.html">Active Directory client software</a></span></dt>
3232 <dd><dl>
33 <dt><span class="section"><a href="guide-active-directory-client.html#idp10880368">Using SSSD with Active Directory</a></span></dt>
34 <dt><span class="section"><a href="guide-active-directory-client.html#idp6592816">Using Winbind with Active Directory</a></span></dt>
33 <dt><span class="section"><a href="guide-active-directory-client.html#idp8178992">Using SSSD with Active Directory</a></span></dt>
34 <dt><span class="section"><a href="guide-active-directory-client.html#idp6168432">Using Winbind with Active Directory</a></span></dt>
3535 </dl></dd>
3636 <dt><span class="section"><a href="guide-active-directory-join.html">Joining an Active Directory domain</a></span></dt>
3737 <dt><span class="section"><a href="guide-active-directory-permit.html">Logins using Domain Accounts</a></span></dt>
3838 </dl></dd>
3939 <dt><span class="chapter"><a href="guide-freeipa.html">Using with FreeIPA</a></span></dt>
40 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp9009232">Discovering FreeIPA domains</a></span></dt></dl></dd>
40 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp8001472">Discovering FreeIPA domains</a></span></dt></dl></dd>
4141 <dt><span class="chapter"><a href="guide-freeipa.html">Using with other Kerberos realms</a></span></dt>
42 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp8851920">Discovering Kerberos realms</a></span></dt></dl></dd>
42 <dd><dl><dt><span class="section"><a href="guide-freeipa.html#idp5982432">Discovering Kerberos realms</a></span></dt></dl></dd>
4343 <dt><span class="chapter"><a href="guide-configuring.html">Configuring realmd</a></span></dt>
4444 <dd><dl>
4545 <dt><span class="section"><a href="guide-configuring.html#guide-configuring-active-directory">active-directory</a></span></dt>
46 <dd><dl><dt><span class="section"><a href="guide-configuring.html#idp7104192">default-client</a></span></dt></dl></dd>
46 <dd><dl><dt><span class="section"><a href="guide-configuring.html#idp8618752">default-client</a></span></dt></dl></dd>
4747 <dt><span class="section"><a href="guide-configuring-users.html">user</a></span></dt>
4848 <dd><dl>
49 <dt><span class="section"><a href="guide-configuring-users.html#idp6023568">default-home</a></span></dt>
50 <dt><span class="section"><a href="guide-configuring-users.html#idp6557504">default-shell</a></span></dt>
49 <dt><span class="section"><a href="guide-configuring-users.html#idp8765568">default-home</a></span></dt>
50 <dt><span class="section"><a href="guide-configuring-users.html#idp6097024">default-shell</a></span></dt>
5151 </dl></dd>
5252 <dt><span class="section"><a href="guide-configuring-realm.html">Realm specific settings</a></span></dt>
53 <dd><dl><dt><span class="section"><a href="guide-configuring-realm.html#idp9639264">computer-ou</a></span></dt></dl></dd>
53 <dd><dl><dt><span class="section"><a href="guide-configuring-realm.html#idp7293920">computer-ou</a></span></dt></dl></dd>
5454 </dl></dd>
5555 <dt><span class="chapter"><a href="guide-integration.html">Integration</a></span></dt>
5656 </dl></dd>
3737 <div class="cmdsynopsis"><p><code class="command">realm deny [-a] [-R realm] {user} ...</code> </p></div>
3838 </div>
3939 <div class="refsect1">
40 <a name="idp7433168"></a><h2>Description</h2>
40 <a name="idp7756624"></a><h2>Description</h2>
4141 <p><span class="command"><strong>realm</strong></span> is a command line tool that
4242 can be used to manage enrollment in kerberos realms, like Active
4343 Directory domains or IPA domains.</p>
4444 </div>
4545 <div class="refsect1">
46 <a name="idp7435184"></a><h2>Discover</h2>
46 <a name="idp7758640"></a><h2>Discover</h2>
4747 <p>Discover a realm and its capabilities.</p>
4848 <div class="informalexample">
4949 <pre class="programlisting">
8787 </table></div>
8888 </div>
8989 <div class="refsect1">
90 <a name="idp7446752"></a><h2>Join</h2>
90 <a name="idp7770256"></a><h2>Join</h2>
9191 <p>Configure the local machine for use with a realm.</p>
9292 <div class="informalexample">
9393 <pre class="programlisting">
9494 $ realm join domain.example.com
9595 </pre>
9696 <pre class="programlisting">
97 $ realm join -user=admin --computer-ou=OU=Special domain.example.com
97 $ realm join --user=admin --computer-ou=OU=Special domain.example.com
9898 </pre>
9999 </div>
100100 <p>The realm is first discovered, as we would with the
168168 </table></div>
169169 </div>
170170 <div class="refsect1">
171 <a name="idp7469072"></a><h2>Leave</h2>
171 <a name="idp7792768"></a><h2>Leave</h2>
172172 <p>Deconfigure the local machine for use with a realm.</p>
173173 <div class="informalexample">
174174 <pre class="programlisting">
222222 </table></div>
223223 </div>
224224 <div class="refsect1">
225 <a name="idp10245296"></a><h2>List</h2>
225 <a name="idp9900960"></a><h2>List</h2>
226226 <p>List all the discovered and configured realms.</p>
227227 <div class="informalexample">
228228 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
249249 </table></div>
250250 </div>
251251 <div class="refsect1">
252 <a name="idp10249632"></a><h2>Permit</h2>
252 <a name="idp9905296"></a><h2>Permit</h2>
253253 <p>Permit local login by users of the realm.</p>
254254 <div class="informalexample">
255255 <pre class="programlisting">
289289 </table></div>
290290 </div>
291291 <div class="refsect1">
292 <a name="idp10258944"></a><h2>Deny</h2>
292 <a name="idp9914608"></a><h2>Deny</h2>
293293 <p>Deny local login by users of the realm.</p>
294294 <div class="informalexample">
295295 <pre class="programlisting">
88 <sub name="Using with Active Directory" link="guide-active-directory.html">
99 <sub name="Discovering Active Directory domains" link="guide-active-directory.html#guide-active-directory-discover"/>
1010 <sub name="Active Directory client software" link="guide-active-directory-client.html">
11 <sub name="Using SSSD with Active Directory" link="guide-active-directory-client.html#idp10880368"/>
12 <sub name="Using Winbind with Active Directory" link="guide-active-directory-client.html#idp6592816"/>
11 <sub name="Using SSSD with Active Directory" link="guide-active-directory-client.html#idp8178992"/>
12 <sub name="Using Winbind with Active Directory" link="guide-active-directory-client.html#idp6168432"/>
1313 </sub>
1414 <sub name="Joining an Active Directory domain" link="guide-active-directory-join.html"/>
1515 <sub name="Logins using Domain Accounts" link="guide-active-directory-permit.html"/>
1616 </sub>
1717 <sub name="Using with FreeIPA" link="guide-freeipa.html">
18 <sub name="Discovering FreeIPA domains" link="guide-freeipa.html#idp9009232"/>
18 <sub name="Discovering FreeIPA domains" link="guide-freeipa.html#idp8001472"/>
1919 </sub>
2020 <sub name="Using with other Kerberos realms" link="guide-freeipa.html">
21 <sub name="Discovering Kerberos realms" link="guide-freeipa.html#idp8851920"/>
21 <sub name="Discovering Kerberos realms" link="guide-freeipa.html#idp5982432"/>
2222 </sub>
2323 <sub name="Configuring realmd" link="guide-configuring.html">
2424 <sub name="active-directory" link="guide-configuring.html#guide-configuring-active-directory">
25 <sub name="default-client" link="guide-configuring.html#idp7104192"/>
25 <sub name="default-client" link="guide-configuring.html#idp8618752"/>
2626 </sub>
2727 <sub name="user" link="guide-configuring-users.html">
28 <sub name="default-home" link="guide-configuring-users.html#idp6023568"/>
29 <sub name="default-shell" link="guide-configuring-users.html#idp6557504"/>
28 <sub name="default-home" link="guide-configuring-users.html#idp8765568"/>
29 <sub name="default-shell" link="guide-configuring-users.html#idp6097024"/>
3030 </sub>
3131 <sub name="Realm specific settings" link="guide-configuring-realm.html">
32 <sub name="computer-ou" link="guide-configuring-realm.html#idp9639264"/>
32 <sub name="computer-ou" link="guide-configuring-realm.html#idp7293920"/>
3333 </sub>
3434 </sub>
3535 <sub name="Integration" link="guide-integration.html"/>
111111 $ realm join domain.example.com
112112 </programlisting>
113113 <programlisting>
114 $ realm join -user=admin --computer-ou=OU=Special domain.example.com
114 $ realm join --user=admin --computer-ou=OU=Special domain.example.com
115115 </programlisting>
116116 </informalexample>
117117
0 0.9
0 0.10
9595 GQueue failures;
9696 GQueue results;
9797 gint relevance;
98 GVariant *realms;
98 GList *realms;
9999 } DiscoverClosure;
100
101 typedef struct {
102 GList *realms;
103 gint relevance;
104 } DiscoverResult;
105
106 static void
107 discover_result_free (gpointer data)
108 {
109 DiscoverResult *disco = data;
110 g_list_free_full (disco->realms, g_object_unref);
111 g_slice_free (DiscoverResult, disco);
112 }
100113
101114 static void
102115 discover_closure_free (gpointer data)
105118 g_free (discover->operation_id);
106119 g_object_unref (discover->invocation);
107120 while (!g_queue_is_empty (&discover->results))
108 g_variant_unref (g_queue_pop_head (&discover->results));
121 discover_result_free (g_queue_pop_head (&discover->results));
109122 while (!g_queue_is_empty (&discover->failures))
110123 g_error_free (g_queue_pop_head (&discover->failures));
111 if (discover->realms)
112 g_variant_unref (discover->realms);
124 g_list_free_full (discover->realms, g_object_unref);
113125 g_slice_free (DiscoverClosure, discover);
114126 }
115127
118130 gconstpointer b,
119131 gpointer user_data)
120132 {
121 gint relevance_a = 0;
122 gint relevance_b = 0;
123 GVariant *realms;
124
125 g_variant_get ((GVariant *)a, "(i@ao)", &relevance_a, &realms);
126 g_variant_unref (realms);
127
128 g_variant_get ((GVariant *)b, "(i@ao)", &relevance_b, &realms);
129 g_variant_unref (realms);
130
131 return relevance_b - relevance_a;
133 const DiscoverResult *disco_a = a;
134 const DiscoverResult *disco_b = b;
135
136 return disco_b->relevance - disco_a->relevance;
132137 }
133138
134139 static void
135140 discover_process_results (GSimpleAsyncResult *res,
136141 DiscoverClosure *discover)
137142 {
138 gint relevance = 0;
139143 GError *error;
140 GVariant *result;
141 GVariant *realms;
144 DiscoverResult *disco;
142145 gboolean any = FALSE;
143 GPtrArray *results;
144 GVariantIter iter;
145 GVariant *realm;
146146
147147 g_queue_sort (&discover->results, compare_relevance, NULL);
148 results = g_ptr_array_new_with_free_func ((GDestroyNotify)g_variant_unref);
149148
150149 for (;;) {
151 result = g_queue_pop_head (&discover->results);
152 if (result == NULL)
150 disco = g_queue_pop_head (&discover->results);
151 if (disco == NULL)
153152 break;
154 g_variant_get (result, "(i@ao)", &relevance, &realms);
155 g_variant_iter_init (&iter, realms);
156 while ((realm = g_variant_iter_next_value (&iter)) != NULL)
157 g_ptr_array_add (results, realm);
158 if (relevance > discover->relevance)
159 discover->relevance = relevance;
160 g_variant_unref (realms);
161 g_variant_unref (result);
153 discover->realms = g_list_concat (discover->realms, disco->realms);
154 disco->realms = NULL;
155 if (disco->relevance > discover->relevance)
156 discover->relevance = disco->relevance;
157 discover_result_free (disco);
162158 any = TRUE;
163159 }
164
165 discover->realms = g_variant_new_array (G_VARIANT_TYPE ("o"),
166 (GVariant *const *)results->pdata,
167 results->len);
168 g_variant_ref_sink (discover->realms);
169 g_ptr_array_free (results, TRUE);
170160
171161 if (!any) {
172162 /* If there was a failure, return one of them */
184174 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
185175 DiscoverClosure *discover = g_simple_async_result_get_op_res_gpointer (res);
186176 RealmAllProvider *self = REALM_ALL_PROVIDER (g_async_result_get_source_object (user_data));
177 DiscoverResult *disco;
187178 GError *error = NULL;
188 GVariant *retval;
189 GVariant *realms;
179 GList *realms;
190180 gint relevance;
191181
192 relevance = realm_provider_discover_finish (REALM_PROVIDER (source), result, &realms, &error);
182 realms = realm_provider_discover_finish (REALM_PROVIDER (source), result, &relevance, &error);
193183 if (error == NULL) {
194 retval = g_variant_new ("(i@ao)", relevance, realms);
195 g_queue_push_tail (&discover->results, g_variant_ref_sink (retval));
184 disco = g_slice_new (DiscoverResult);
185 disco->realms = realms;
186 disco->relevance = relevance;
187 g_queue_push_tail (&discover->results, disco);
196188 } else {
197189 g_queue_push_tail (&discover->failures, error);
198190 }
199
200 if (realms)
201 g_variant_unref (realms);
202191
203192 g_assert (discover->outstanding > 0);
204193 discover->outstanding--;
250239 g_object_unref (res);
251240 }
252241
253 static gint
242 static GList *
254243 realm_all_provider_discover_finish (RealmProvider *provider,
255244 GAsyncResult *result,
256 GVariant **realms,
245 gint *relevance,
257246 GError **error)
258247 {
259248 GSimpleAsyncResult *res;
260249 DiscoverClosure *discover;
250 GList *realms;
261251
262252 res = G_SIMPLE_ASYNC_RESULT (result);
263253
264254 if (g_simple_async_result_propagate_error (res, error))
265 return -1;
255 return NULL;
266256
267257 discover = g_simple_async_result_get_op_res_gpointer (res);
268 *realms = discover->realms;
258 *relevance = discover->relevance;
259 realms = discover->realms;
269260 discover->realms = NULL;
270 return discover->relevance;
261 return realms;
271262 }
272263
273264 static void
167167
168168 static gboolean
169169 read_output (int fd,
170 GString *buffer)
170 GString *buffer,
171 GDBusMethodInvocation *invocation)
171172 {
172173 gchar block[1024];
173174 gssize result;
180181 if (errno == EINTR || errno == EAGAIN)
181182 continue;
182183 return FALSE;
183 } else {
184 } else if (result > 0) {
185 realm_diagnostics_info_data (invocation, block, result);
184186 g_string_append_len (buffer, block, result);
185187 }
186188 } while (result == sizeof (block));
230232 ProcessSource *process_source,
231233 gint fd)
232234 {
233 if (!read_output (fd, command->output)) {
235 if (!read_output (fd, command->output, command->invocation)) {
234236 g_warning ("couldn't read output data from process");
235237 return FALSE;
236238 }
243245 ProcessSource *process_source,
244246 gint fd)
245247 {
246 if (!read_output (fd, command->output)) {
248 if (!read_output (fd, command->output, command->invocation)) {
247249 g_warning ("couldn't read error data from process");
248250 return FALSE;
249251 }
610612 return -1;
611613
612614 command = g_simple_async_result_get_op_res_gpointer (res);
613 if (command->output->len)
614 realm_diagnostics_info_data (command->invocation,
615 command->output->str,
616 command->output->len);
617615 if (output) {
618616 *output = command->output;
619617 command->output = NULL;
182182 const gchar *name,
183183 gpointer user_data)
184184 {
185 g_debug ("client gone away: %s", name);
185186 g_hash_table_remove (service_clients, name);
186187 }
187188
196197 client->watch = g_bus_watch_name (G_BUS_TYPE_SYSTEM, sender,
197198 G_BUS_NAME_WATCHER_FLAGS_NONE,
198199 NULL, on_client_vanished, NULL, NULL);
200 g_debug ("client using service: %s", sender);
199201 g_hash_table_insert (service_clients, g_strdup (sender), client);
200202 }
201203
216218
217219 if (g_hash_table_lookup (service_clients, hold))
218220 g_critical ("realm_daemon_hold: already have hold: %s", hold);
221 g_debug ("holding service: %s", hold);
219222 g_hash_table_insert (service_clients, g_strdup (hold), g_slice_new0 (RealmClient));
220223 }
221224
225228 g_assert (hold != NULL);
226229 g_assert (!g_dbus_is_unique_name (hold));
227230
231 g_debug ("releasing service: %s", hold);
228232 if (!g_hash_table_remove (service_clients, hold))
229233 g_critical ("realm_daemon_release: don't have hold: %s", hold);
230234 }
303307 if (type == G_DBUS_MESSAGE_TYPE_METHOD_CALL) {
304308
305309 /* All methods besides 'Release' on the Service interface cause us to watch client */
306 if (g_str_equal (own_name , g_dbus_message_get_sender (message)) &&
307 (!g_str_equal (g_dbus_message_get_path (message), REALM_DBUS_SERVICE_PATH) ||
308 !g_str_equal (g_dbus_message_get_member (message), "Release") ||
309 !g_str_equal (g_dbus_message_get_interface (message), REALM_DBUS_SERVICE_INTERFACE))) {
310 if (!g_str_equal (own_name, g_dbus_message_get_sender (message)) &&
311 !(g_str_equal (g_dbus_message_get_path (message), REALM_DBUS_SERVICE_PATH) &&
312 g_str_equal (g_dbus_message_get_member (message), "Release") &&
313 g_str_equal (g_dbus_message_get_interface (message), REALM_DBUS_SERVICE_INTERFACE))) {
310314 g_idle_add_full (G_PRIORITY_DEFAULT,
311315 on_idle_hold_for_message,
312316 g_object_ref (message),
325329 const char *sender;
326330
327331 sender = g_dbus_method_invocation_get_sender (invocation);
332 g_debug ("explicitly releasing service: %s", sender);
328333 g_hash_table_remove (service_clients, sender);
329334
330335 return TRUE;
374379 gpointer user_data)
375380 {
376381 if (!service_bus_name_claimed)
377 g_printerr ("couldn't claim service name on DBus bus: %s", name);
382 g_message ("couldn't claim service name on DBus bus: %s", name);
378383 else
379384 g_warning ("lost service name on DBus bus: %s", name);
380385 }
7676 g_object_unref (async);
7777 }
7878
79 static gint
79 static GList *
8080 realm_kerberos_provider_discover_finish (RealmProvider *provider,
8181 GAsyncResult *result,
82 GVariant **realms,
82 gint *relevance,
8383 GError **error)
8484 {
8585 RealmKerberos *realm = NULL;
8686 GSimpleAsyncResult *async;
8787 GHashTable *discovery;
8888 GAsyncResult *kerberos_result;
89 const gchar *object_path;
9089 gchar *name;
9190
9291 async = G_SIMPLE_ASYNC_RESULT (result);
9392 kerberos_result = g_simple_async_result_get_op_res_gpointer (async);
9493 if (kerberos_result == NULL)
95 return 0;
94 return NULL;
9695
9796 name = realm_kerberos_discover_finish (kerberos_result, &discovery, error);
9897 if (name == NULL)
99 return 0;
98 return NULL;
10099
101100 /* If any known software, don't create the realm */
102101 if (!realm_discovery_get_string (discovery, REALM_DBUS_OPTION_SERVER_SOFTWARE)) {
109108 g_hash_table_unref (discovery);
110109
111110 if (realm == NULL)
112 return 0;
113
114 object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (realm));
115 *realms = g_variant_new_objv (&object_path, 1);
116 g_variant_ref_sink (*realms);
111 return NULL;
117112
118113 /* Return a low priority as we can't handle enrollment */
119 return 10;
114 *relevance = 10;
115 return g_list_append (NULL, g_object_ref (realm));
120116 }
121117
122118 void
462462 gpointer user_data)
463463 {
464464 RealmKerberos *self = REALM_KERBEROS (user_data);
465 gchar hostname[HOST_NAME_MAX + 1];
465466 RealmKerberosFlags flags = 0;
466467 GVariant *creds;
467468 RealmKerberosCredential cred_type;
469 gint ret;
468470
469471 /* Make note of the current operation id, for diagnostics */
470472 realm_diagnostics_setup_options (invocation, options);
471473
472474 if (!validate_and_parse_credentials (invocation, credentials, &flags, &cred_type, &creds))
473475 return TRUE;
476
477 /* Check the host name */
478 ret = gethostname (hostname, sizeof (hostname));
479 if (ret < 0 || g_ascii_strcasecmp (hostname, "localhost") == 0 ||
480 g_ascii_strncasecmp (hostname, "localhost.", 10) == 0) {
481 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_FAILED,
482 "This computer's host name is not set correctly.");
483 return TRUE;
484 }
474485
475486 switch (cred_type) {
476487 case REALM_KERBEROS_CREDENTIAL_CCACHE:
12961307 g_ptr_array_free (tuples, TRUE);
12971308 }
12981309
1310 gboolean
1311 realm_kerberos_is_configured (RealmKerberos *self)
1312 {
1313 const gchar *configured;
1314
1315 g_return_val_if_fail (REALM_IS_KERBEROS (self), FALSE);
1316 configured = realm_dbus_realm_get_configured (self->pv->realm_iface);
1317 return configured && !g_str_equal (configured, "");
1318 }
1319
12991320 void
13001321 realm_kerberos_set_configured (RealmKerberos *self,
13011322 gboolean configured)
127127 void realm_kerberos_set_details (RealmKerberos *self,
128128 ...) G_GNUC_NULL_TERMINATED;
129129
130 gboolean realm_kerberos_is_configured (RealmKerberos *self);
131
130132 void realm_kerberos_set_configured (RealmKerberos *self,
131133 gboolean configured);
132134
5656 g_slice_free (MethodClosure, closure);
5757 }
5858
59 static gint
60 sort_configured_first (gconstpointer a,
61 gconstpointer b)
62 {
63 gint a_val = realm_kerberos_is_configured (REALM_KERBEROS (a)) ? 0 : 1;
64 gint b_val = realm_kerberos_is_configured (REALM_KERBEROS (b)) ? 0 : 1;
65 return a_val - b_val;
66 }
67
5968 static void
6069 on_discover_complete (GObject *source,
6170 GAsyncResult *result,
6473 MethodClosure *closure = user_data;
6574 GVariant *retval;
6675 GError *error = NULL;
67 GVariant *realms = NULL;
76 GPtrArray *results;
77 const gchar *path;
78 GList *realms;
6879 gint relevance;
69
70 relevance = realm_provider_discover_finish (closure->self, result, &realms, &error);
80 GList *l;
81
82 realms = realm_provider_discover_finish (closure->self, result, &relevance, &error);
7183 if (error == NULL) {
72 retval = g_variant_new ("(i@ao)", relevance, realms);
84 realms = g_list_sort (realms, sort_configured_first);
85 results = g_ptr_array_new ();
86 for (l = realms; l != NULL; l = g_list_next (l)) {
87 path = g_dbus_object_get_object_path (l->data);
88 g_ptr_array_add (results, g_variant_new_object_path (path));
89 }
90 g_list_free_full (realms, g_object_unref);
91
92 retval = g_variant_new ("(i@ao)", relevance,
93 g_variant_new_array (G_VARIANT_TYPE ("o"),
94 (GVariant *const *)results->pdata,
95 results->len));
96 g_ptr_array_free (results, TRUE);
97
7398 g_dbus_method_invocation_return_value (closure->invocation, retval);
74 g_variant_unref (realms);
7599 } else {
76100 if (error->domain == REALM_ERROR || error->domain == G_DBUS_ERROR) {
77101 g_dbus_error_strip_remote_error (error);
312336 (klass->discover_async) (self, string, options, invocation, callback, user_data);
313337 }
314338
315 gint
339 GList *
316340 realm_provider_discover_finish (RealmProvider *self,
317341 GAsyncResult *result,
318 GVariant **realms,
342 gint *relevance,
319343 GError **error)
320344 {
321345 RealmProviderClass *klass;
322 gint relevance;
323346 GError *sub_error = NULL;
347 GList *realms;
324348
325349 klass = REALM_PROVIDER_GET_CLASS (self);
326 g_return_val_if_fail (klass->discover_finish != NULL, -1);
327
328 *realms = NULL;
329
330 relevance = (klass->discover_finish) (self, result, realms, &sub_error);
350 g_return_val_if_fail (klass->discover_finish != NULL, NULL);
351
352 realms = (klass->discover_finish) (self, result, relevance, &sub_error);
331353 if (sub_error == NULL) {
332 if (realms != NULL && *realms == NULL) {
333 *realms = g_variant_new_array (G_VARIANT_TYPE ("o"), NULL, 0);
334 g_variant_ref_sink (*realms);
335 }
354 if (realms == NULL)
355 *relevance = 0;
336356 } else {
337357 g_propagate_error (error, sub_error);
338358 }
339359
340 return relevance;
360 return realms;
341361 }
342362
343363 gboolean
4949 GAsyncReadyCallback callback,
5050 gpointer user_data);
5151
52 gint (* discover_finish) (RealmProvider *provider,
52 GList * (* discover_finish) (RealmProvider *provider,
5353 GAsyncResult *result,
54 GVariant **realms,
54 gint *relevance,
5555 GError **error);
5656 };
5757
7777 GAsyncReadyCallback callback,
7878 gpointer user_data);
7979
80 gint realm_provider_discover_finish (RealmProvider *self,
80 GList * realm_provider_discover_finish (RealmProvider *self,
8181 GAsyncResult *result,
82 GVariant **realms,
82 gint *relevance,
8383 GError **error);
8484
8585 void realm_provider_set_name (RealmProvider *self,
365365 if (computer_ou != NULL) {
366366 strange_ou = realm_samba_util_build_strange_ou (computer_ou, realm);
367367 if (strange_ou) {
368 join->create_computer_arg = g_strdup_printf ("createcomputer=%s", strange_ou);
368 if (!g_str_equal (strange_ou, ""))
369 join->create_computer_arg = g_strdup_printf ("createcomputer=%s", strange_ou);
369370 g_free (strange_ou);
370371 } else {
371372 g_set_error (&error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
122122 g_object_unref (async);
123123 }
124124
125 static gint
125 static GList *
126126 realm_samba_provider_discover_finish (RealmProvider *provider,
127127 GAsyncResult *result,
128 GVariant **realms,
128 gint *relevance,
129129 GError **error)
130130 {
131131 RealmKerberos *realm = NULL;
132132 GSimpleAsyncResult *async;
133133 GHashTable *discovery;
134134 GAsyncResult *ad_result;
135 const gchar *object_path;
136135 gchar *name;
137136
138137 async = G_SIMPLE_ASYNC_RESULT (result);
139138 ad_result = g_simple_async_result_get_op_res_gpointer (async);
140139 if (ad_result == NULL)
141 return 0;
140 return NULL;
142141
143142 name = realm_kerberos_discover_finish (ad_result, &discovery, error);
144143 if (name == NULL)
145 return 0;
144 return NULL;
146145
147146 if (realm_discovery_has_string (discovery,
148147 REALM_DBUS_OPTION_SERVER_SOFTWARE,
157156 g_hash_table_unref (discovery);
158157
159158 if (realm == NULL)
160 return 0;
161
162 object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (realm));
163 *realms = g_variant_new_objv (&object_path, 1);
164 g_variant_ref_sink (*realms);
159 return NULL;
165160
166161 /* Return a higher priority if we're the default */
167 return realm_provider_is_default (REALM_DBUS_IDENTIFIER_ACTIVE_DIRECTORY, REALM_DBUS_IDENTIFIER_WINBIND) ? 100 : 50;
162 *relevance = realm_provider_is_default (REALM_DBUS_IDENTIFIER_ACTIVE_DIRECTORY, REALM_DBUS_IDENTIFIER_WINBIND) ? 100 : 50;
163 return g_list_append (NULL, g_object_ref (realm));
168164 }
169165
170166 static void
5757
5858 for (i = 0; dn[i] != NULL && domain_dn[i] != NULL; i++) {
5959 for (j = 0; dn[i][j] != NULL && domain_dn[i][j] != NULL; j++) {
60 if (!berval_case_equals (&(dn[i][j]->la_attr), &(domain_dn[i][j]->la_attr)) &&
60 if (!berval_case_equals (&(dn[i][j]->la_attr), &(domain_dn[i][j]->la_attr)) ||
6161 !berval_case_equals (&(dn[i][j]->la_value), &(domain_dn[i][j]->la_value)))
6262 break;
6363 }
9898 * NB: A backslash '\' is used as escape at multiple levels and may
9999 * need to be doubled or even quadrupled. It is not used as a separator.
100100 */
101
102 /* ldap_str2dn doesn't like empty strings */
103 while (g_ascii_isspace (ldap_dn[0]))
104 ldap_dn++;
105 if (g_str_equal (ldap_dn, ""))
106 return NULL;
101107
102108 rc = ldap_str2dn (ldap_dn, &dn, LDAP_DN_FORMAT_LDAPV3);
103109 if (rc != LDAP_SUCCESS)
9393 "idmap gid", "10000-20000",
9494 "winbind enum users", "no",
9595 "winbind enum groups", "no",
96 "template shell", realm_settings_string ("user", "shell"),
96 "template shell", realm_settings_string ("users", "default-shell"),
9797 "winbind offline logon", "yes",
9898 "winbind refresh tickets", "yes",
9999 NULL);
146146 g_object_unref (async);
147147 }
148148
149 static gint
149 static GList *
150150 realm_sssd_provider_discover_finish (RealmProvider *provider,
151151 GAsyncResult *result,
152 GVariant **realms,
152 gint *relevance,
153153 GError **error)
154154 {
155155 GSimpleAsyncResult *async;
156156 GAsyncResult *ad_result;
157157 RealmKerberos *realm = NULL;
158158 GHashTable *discovery;
159 const gchar *object_path;
160159 gint priority;
161160 gchar *name;
162161
163162 async = G_SIMPLE_ASYNC_RESULT (result);
164163 ad_result = g_simple_async_result_get_op_res_gpointer (async);
165164 if (ad_result == NULL)
166 return 0;
165 return NULL;
167166
168167 name = realm_kerberos_discover_finish (ad_result, &discovery, error);
169168 if (name == NULL)
170 return 0;
169 return NULL;
171170
172171 if (realm_discovery_has_string (discovery,
173172 REALM_DBUS_OPTION_SERVER_SOFTWARE,
192191 g_hash_table_unref (discovery);
193192
194193 if (realm == NULL)
195 return 0;
196
197 object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (realm));
198 *realms = g_variant_new_objv (&object_path, 1);
199 g_variant_ref_sink (*realms);
194 return NULL;
200195
201196 /* Return a higher priority if we're the default */
202 return priority;
197 *relevance = priority;
198 return g_list_append (NULL, g_object_ref (realm));
203199 }
204200
205201 static void
22 smb.conf = /etc/samba/smb.conf
33
44 [samba-packages]
5 samba4-common = /usr/bin/net
5 samba-common = /usr/bin/net
66
77 [winbind-packages]
8 samba4-winbind = /usr/sbin/winbindd
9 samba4-winbind-clients = /usr/bin/wbinfo
8 samba-winbind = /usr/sbin/winbindd
9 samba-winbind-clients = /usr/bin/wbinfo
1010
1111 [sssd-packages]
1212 sssd = /usr/sbin/sssd
4747 { "OU=One,OU=Two Here,DC=domain,dc=example,Dc=COM", "domain.example.com", "Two Here/One" },
4848 { "OU=One,OU=Two Here,DC=invalid,Dc=COM", "domain.example.com", NULL },
4949 { " ", "domain.example.com", NULL },
50 { "", "domain.example.com", NULL },
5051 { "OU", "domain.example.com", NULL },
5152 { "OU=One,", "domain.example.com", NULL },
5253 { "CN=Unsupported", "domain.example.com", NULL },
5354 { "OU=One+CN=Unsupported", "domain.example.com", NULL },
55 { "DC=radi07, DC=segad, DC=lab, DC=sjc, DC=redhat, DC=com", "radi08.segad.lab.sjc.redhat.com", NULL },
56
5457 };
5558
5659 int
6669 g_set_prgname ("test-samba-ou-format");
6770
6871 for (i = 0; i < G_N_ELEMENTS (samba_ou_fixtures); i++) {
69 escaped = g_strdup (samba_ou_fixtures[i].ldap_dn);
72 if (g_str_equal (samba_ou_fixtures[i].ldap_dn, ""))
73 escaped = g_strdup ("_empty_");
74 else
75 escaped = g_strdup (samba_ou_fixtures[i].ldap_dn);
7076 g_strdelimit (escaped, ", =\\/", '_');
7177 name = g_strdup_printf ("/realmd/samba-ou-format/%s", escaped);
7278 g_free (escaped);
208208 if (!g_option_context_parse (context, &argc, &argv, &error)) {
209209 g_printerr ("%s: %s\n", g_get_prgname (), error->message);
210210 g_error_free (error);
211 ret = 2;
211 g_free (realm_name);
212 g_option_context_free (context);
213 return 2;
212214 }
213215
214216 if (arg_all) {