Imported Upstream version 0.2
Laurent Bigonville
11 years ago
0 | 0 | # Generate automatically. Do not edit. |
1 | ||
2 | commit 3e3bebbf4d0294f71a7f7531c4701c85476b5854 | |
3 | Author: Stef Walter <stefw@gnome.org> | |
4 | Date: 2012-06-15 | |
5 | ||
6 | Release version 0.2 | |
7 | ||
8 | NEWS | 7 +++++++ | |
9 | configure.ac | 2 +- | |
10 | 2 files changed, 8 insertions(+), 1 deletion(-) | |
11 | ||
12 | commit 1b1284a911b8439d0c73b03eaca98ee2510c4681 | |
13 | Author: Stef Walter <stefw@gnome.org> | |
14 | Date: 2012-06-15 | |
15 | ||
16 | Remove unused ClientSoftware property, accidentally added | |
17 | ||
18 | And whitespace cleanup | |
19 | ||
20 | dbus/org.freedesktop.realmd.xml | 7 +------ | |
21 | 1 file changed, 1 insertion(+), 6 deletions(-) | |
22 | ||
23 | commit 9c17dd2d2fa8c9c30ebc6114d4a35f4c86a1927c | |
24 | Author: Stef Walter <stefw@gnome.org> | |
25 | Date: 2012-06-15 | |
26 | ||
27 | Add Name and Version properties to the dbus interface | |
28 | ||
29 | Mostly for informational purposes. | |
30 | ||
31 | dbus/org.freedesktop.realmd.xml | 10 ++++++++++ | |
32 | service/realm-all-provider.c | 3 +++ | |
33 | service/realm-provider.c | 3 +++ | |
34 | service/realm-samba-provider.c | 3 +++ | |
35 | 4 files changed, 19 insertions(+) | |
36 | ||
37 | commit 6ce7427246dcc75b229cc03493a305583d390c62 | |
38 | Author: Stef Walter <stefw@gnome.org> | |
39 | Date: 2012-06-15 | |
40 | ||
41 | Use SuggestedAdministrator as a default user in realm-enroll | |
42 | ||
43 | tools/realm-enroll.c | 8 +++++--- | |
44 | 1 file changed, 5 insertions(+), 3 deletions(-) | |
45 | ||
46 | commit 4570b14cfb37e934fb8547808428c09fc4a7a721 | |
47 | Author: Stef Walter <stefw@gnome.org> | |
48 | Date: 2012-06-14 | |
49 | ||
50 | Clearly print out what DNS records we look at for AD | |
51 | ||
52 | service/realm-ad-discover.c | 10 +++++----- | |
53 | 1 file changed, 5 insertions(+), 5 deletions(-) | |
54 | ||
55 | commit 477a2ad94fcc17d8062a29ca96bd7a83b21b16e7 | |
56 | Author: Stef Walter <stefw@gnome.org> | |
57 | Date: 2012-06-14 | |
58 | ||
59 | Temporarily add info to README about AD discovery | |
60 | ||
61 | This will go into fuller docs | |
62 | ||
63 | README | 9 +++++++++ | |
64 | 1 file changed, 9 insertions(+) | |
65 | ||
66 | commit 069ccd4a818a681346779bd4382ed9285010aa92 | |
67 | Author: Stef Walter <stefw@gnome.org> | |
68 | Date: 2012-06-14 | |
69 | ||
70 | Add realm-discover tool to identify a domain | |
71 | ||
72 | .gitignore | 1 + | |
73 | tools/Makefile.am | 5 +- | |
74 | tools/realm-discover.c | 252 ++++++++++++++++++++++++++++++++++++++++++++++++ | |
75 | 3 files changed, 256 insertions(+), 2 deletions(-) | |
76 | ||
77 | commit 6898e049f9b6f1ca898bbc3088eb0725642de69f | |
78 | Author: Stef Walter <stefw@gnome.org> | |
79 | Date: 2012-06-14 | |
80 | ||
81 | Add 'Details' property to Kerberos realm interface | |
82 | ||
83 | This is for informational data, generally not to be acted on | |
84 | by clients but can display for diagnostic reasons if desired. | |
85 | ||
86 | dbus/org.freedesktop.realmd.xml | 10 ++++++++++ | |
87 | service/realm-samba.c | 27 ++++++++++++++++++++++++++- | |
88 | 2 files changed, 36 insertions(+), 1 deletion(-) | |
89 | ||
90 | commit af92a2df67bc2db863561b3302377728e48b1f75 | |
91 | Author: Stef Walter <stefw@gnome.org> | |
92 | Date: 2012-06-14 | |
93 | ||
94 | Add operation_id to most dbus method calls, fix diagnostics | |
95 | ||
96 | A client can pass in a unique operation_id. In the future this | |
97 | allows us to add cancellation. | |
98 | ||
99 | In the short-term we use this operation_id to provide useful | |
100 | diagnostics from the 'all' provider. | |
101 | ||
102 | dbus/org.freedesktop.realmd.xml | 8 ++++ | |
103 | service/realm-ad-discover.c | 1 + | |
104 | service/realm-all-provider.c | 101 +++++++++++++++++++++++++++++++++++---- | |
105 | service/realm-diagnostics.c | 54 +++++++++++++++------ | |
106 | service/realm-diagnostics.h | 6 +++ | |
107 | service/realm-kerberos.c | 30 ++++++++++-- | |
108 | service/realm-provider.c | 8 ++-- | |
109 | tests/change-permitted.py | 4 +- | |
110 | tests/discover-python.py | 10 ++-- | |
111 | tests/enroll-machine.py | 12 ++--- | |
112 | tools/realm-enroll.c | 19 +++++--- | |
113 | 11 files changed, 202 insertions(+), 51 deletions(-) | |
114 | ||
115 | commit aa5c73828a62b6d63f0f96aec1d3a7679b583fb8 | |
116 | Author: Stef Walter <stefw@gnome.org> | |
117 | Date: 2012-06-14 | |
118 | ||
119 | Add debug messages when loading providers | |
120 | ||
121 | And fix REALM_DEBUG_PROVIDER debug flag | |
122 | ||
123 | service/realm-all-provider.c | 7 ++++++- | |
124 | service/realm-debug.c | 1 + | |
125 | 2 files changed, 7 insertions(+), 1 deletion(-) | |
126 | ||
127 | commit 3c4191ac543f50cf6e90ea9922c2184e88e6d1c3 | |
128 | Author: Stef Walter <stefw@gnome.org> | |
129 | Date: 2012-06-14 | |
130 | ||
131 | Fix provider path regression in previous commit | |
132 | ||
133 | service/Makefile.am | 2 +- | |
134 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
135 | ||
136 | commit 28d14efdddf2811183ef9c2c3478a6f64778064a | |
137 | Author: Stef Walter <stefw@gnome.org> | |
138 | Date: 2012-06-14 | |
139 | ||
140 | Fix compiler warnings, add fortify source | |
141 | ||
142 | We only enable fortify source when optimization is enabled | |
143 | otherwise it becomes a source of warnings itself. | |
144 | ||
145 | configure.ac | 15 +++++++++++++++ | |
146 | service/realm-ad-discover.c | 3 ++- | |
147 | service/realm-all-provider.c | 3 +++ | |
148 | service/realm-debug.c | 8 +++++++- | |
149 | service/realm-kerberos.c | 2 +- | |
150 | service/realm-provider.c | 2 +- | |
151 | 6 files changed, 29 insertions(+), 4 deletions(-) | |
152 | ||
153 | commit c0ec7e29a195ff02301ca36225fba25a60959251 | |
154 | Author: Stef Walter <stefw@gnome.org> | |
155 | Date: 2012-06-14 | |
156 | ||
157 | Add proper dbus service files, and reorganize install | |
158 | ||
159 | Choose a less confusing name for private files (those in | |
160 | /usr/lib/realmd). Add dbus service files which were | |
161 | conspicuously missing. | |
162 | ||
163 | .gitignore | 1 + | |
164 | Makefile.decl | 34 +++++++++++++++++++++++++ | |
165 | configure.ac | 7 +++-- | |
166 | dbus/Makefile.am | 19 +++++++++++--- | |
167 | dbus/org.freedesktop.realmd.Samba.provider | 4 +++ | |
168 | dbus/org.freedesktop.realmd.Samba.service.in | 4 +++ | |
169 | dbus/org.freedesktop.realmd.service.in | 4 +++ | |
170 | service/Makefile.am | 19 +++++--------- | |
171 | service/org.freedesktop.realmd.Samba.provider | 4 --- | |
172 | service/realm-samba-enroll.c | 2 +- | |
173 | service/realm-settings.c | 4 +-- | |
174 | tests/Makefile.am | 2 +- | |
175 | 12 files changed, 79 insertions(+), 25 deletions(-) | |
176 | ||
177 | commit 166e0cf13304663ab500093455924f0e3b0d3266 | |
178 | Author: Stef Walter <stefw@gnome.org> | |
179 | Date: 2012-06-13 | |
180 | ||
181 | Fix use of uninitialized variable | |
182 | ||
183 | service/realm-ini-config.c | 1 - | |
184 | 1 file changed, 1 deletion(-) | |
1 | 185 | |
2 | 186 | commit 024b6985e54ce5392c4665aa273b223f0e7f3bbe |
3 | 187 | Author: Stef Walter <stefw@gnome.org> |
24 | 24 | $(LCOV) --directory . --zerocounters |
25 | 25 | |
26 | 26 | endif |
27 | ||
28 | V_SED = $(V_SED_$(V)) | |
29 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
30 | V_SED_0 = @echo " SED " $@; | |
31 | ||
32 | SED_SUBST = sed \ | |
33 | -e 's,[@]datadir[@],$(datadir),g' \ | |
34 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
35 | -e 's,[@]libdir[@],$(libdir),g' \ | |
36 | -e 's,[@]includedir[@],$(includedir),g' \ | |
37 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
38 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
39 | -e 's,[@]bindir[@],$(bindir),g' \ | |
40 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
41 | -e 's,[@]prefix[@],$(prefix),g' \ | |
42 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
43 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
44 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
45 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
46 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
47 | $(NULL) | |
48 | ||
49 | .desktop.in.in.desktop.in: | |
50 | $(V_SED) $(SED_SUBST) $< > $@ | |
51 | ||
52 | @INTLTOOL_DESKTOP_RULE@ | |
53 | ||
54 | .service.in.service: | |
55 | $(V_SED) $(SED_SUBST) $< > $@ | |
56 | ||
57 | .conf.in.conf: | |
58 | $(V_SED) $(SED_SUBST) $< > $@ | |
59 | ||
60 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in⏎ |
128 | 128 | CYGPATH_W = @CYGPATH_W@ |
129 | 129 | DATADIRNAME = @DATADIRNAME@ |
130 | 130 | DBUS_POLICY_DIR = @DBUS_POLICY_DIR@ |
131 | DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ | |
131 | 132 | DEFS = @DEFS@ |
132 | 133 | DEPDIR = @DEPDIR@ |
133 | 134 | DISTRO = @DISTRO@ |
197 | 198 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
198 | 199 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
199 | 200 | RANLIB = @RANLIB@ |
200 | SERVICE_DIR = @SERVICE_DIR@ | |
201 | 201 | SET_MAKE = @SET_MAKE@ |
202 | 202 | SHELL = @SHELL@ |
203 | 203 | STRIP = @STRIP@ |
239 | 239 | oldincludedir = @oldincludedir@ |
240 | 240 | pdfdir = @pdfdir@ |
241 | 241 | prefix = @prefix@ |
242 | privatedir = @privatedir@ | |
242 | 243 | program_transform_name = @program_transform_name@ |
243 | 244 | psdir = @psdir@ |
244 | 245 | sbindir = @sbindir@ |
251 | 252 | top_srcdir = @top_srcdir@ |
252 | 253 | NULL = |
253 | 254 | TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions |
255 | V_SED = $(V_SED_$(V)) | |
256 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
257 | V_SED_0 = @echo " SED " $@; | |
258 | SED_SUBST = sed \ | |
259 | -e 's,[@]datadir[@],$(datadir),g' \ | |
260 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
261 | -e 's,[@]libdir[@],$(libdir),g' \ | |
262 | -e 's,[@]includedir[@],$(includedir),g' \ | |
263 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
264 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
265 | -e 's,[@]bindir[@],$(bindir),g' \ | |
266 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
267 | -e 's,[@]prefix[@],$(prefix),g' \ | |
268 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
269 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
270 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
271 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
272 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
273 | $(NULL) | |
274 | ||
275 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
254 | 276 | ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS} |
255 | 277 | SUBDIRS = build dbus service tools tests po |
256 | 278 | DISTCHECK_CONFIGURE_FLAGS = \ |
263 | 285 | $(MAKE) $(AM_MAKEFLAGS) all-recursive |
264 | 286 | |
265 | 287 | .SUFFIXES: |
288 | .SUFFIXES: .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
266 | 289 | am--refresh: Makefile |
267 | 290 | @: |
268 | 291 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps) |
787 | 810 | @WITH_COVERAGE_TRUE@clear-coverage: |
788 | 811 | @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters |
789 | 812 | |
813 | .desktop.in.in.desktop.in: | |
814 | $(V_SED) $(SED_SUBST) $< > $@ | |
815 | ||
816 | @INTLTOOL_DESKTOP_RULE@ | |
817 | ||
818 | .service.in.service: | |
819 | $(V_SED) $(SED_SUBST) $< > $@ | |
820 | ||
821 | .conf.in.conf: | |
822 | $(V_SED) $(SED_SUBST) $< > $@ | |
823 | ||
790 | 824 | dist-hook: |
791 | 825 | @if test -d "$(srcdir)/.git"; \ |
792 | 826 | then \ |
0 | 0.2 | |
1 | * Add possibility for cancellation to the DBus interface | |
2 | * Add provider Name and Version properties | |
3 | * Clearer diagnostics on discovery | |
4 | * Add realm-discover tool to identify a domain | |
5 | * Add proper DBus service files | |
6 | ||
0 | 7 | 0.1 |
1 | 8 | * Initial release |
0 | 0 | DBus service for configuring kerberos and other online identities. |
1 | ||
2 | How Active Directory domains are discovered | |
3 | ============================================ | |
4 | ||
5 | AD servers are located using the standard DNS kerberos SRV records | |
6 | and the Microsoft standard subzone for the domain. For example: | |
7 | ||
8 | * A SRV record: _kerberos._udp.example.com | |
9 | * An MSDCS subzone: _msdcs.example.com |
69 | 69 | CYGPATH_W = @CYGPATH_W@ |
70 | 70 | DATADIRNAME = @DATADIRNAME@ |
71 | 71 | DBUS_POLICY_DIR = @DBUS_POLICY_DIR@ |
72 | DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ | |
72 | 73 | DEFS = @DEFS@ |
73 | 74 | DEPDIR = @DEPDIR@ |
74 | 75 | DISTRO = @DISTRO@ |
138 | 139 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
139 | 140 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
140 | 141 | RANLIB = @RANLIB@ |
141 | SERVICE_DIR = @SERVICE_DIR@ | |
142 | 142 | SET_MAKE = @SET_MAKE@ |
143 | 143 | SHELL = @SHELL@ |
144 | 144 | STRIP = @STRIP@ |
180 | 180 | oldincludedir = @oldincludedir@ |
181 | 181 | pdfdir = @pdfdir@ |
182 | 182 | prefix = @prefix@ |
183 | privatedir = @privatedir@ | |
183 | 184 | program_transform_name = @program_transform_name@ |
184 | 185 | psdir = @psdir@ |
185 | 186 | sbindir = @sbindir@ |
192 | 193 | top_srcdir = @top_srcdir@ |
193 | 194 | NULL = |
194 | 195 | TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions |
196 | V_SED = $(V_SED_$(V)) | |
197 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
198 | V_SED_0 = @echo " SED " $@; | |
199 | SED_SUBST = sed \ | |
200 | -e 's,[@]datadir[@],$(datadir),g' \ | |
201 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
202 | -e 's,[@]libdir[@],$(libdir),g' \ | |
203 | -e 's,[@]includedir[@],$(includedir),g' \ | |
204 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
205 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
206 | -e 's,[@]bindir[@],$(bindir),g' \ | |
207 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
208 | -e 's,[@]prefix[@],$(prefix),g' \ | |
209 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
210 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
211 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
212 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
213 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
214 | $(NULL) | |
215 | ||
216 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
195 | 217 | all: all-am |
196 | 218 | |
197 | 219 | .SUFFIXES: |
220 | .SUFFIXES: .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
198 | 221 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps) |
199 | 222 | @for dep in $?; do \ |
200 | 223 | case '$(am__configure_deps)' in \ |
397 | 420 | @WITH_COVERAGE_TRUE@clear-coverage: |
398 | 421 | @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters |
399 | 422 | |
423 | .desktop.in.in.desktop.in: | |
424 | $(V_SED) $(SED_SUBST) $< > $@ | |
425 | ||
426 | @INTLTOOL_DESKTOP_RULE@ | |
427 | ||
428 | .service.in.service: | |
429 | $(V_SED) $(SED_SUBST) $< > $@ | |
430 | ||
431 | .conf.in.conf: | |
432 | $(V_SED) $(SED_SUBST) $< > $@ | |
433 | ||
400 | 434 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
401 | 435 | # Otherwise a system limit (for SysV at least) may be exceeded. |
402 | 436 | .NOEXPORT: |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.68 for realmd 0.1. | |
2 | # Generated by GNU Autoconf 2.68 for realmd 0.2. | |
3 | 3 | # |
4 | 4 | # Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=realmd>. |
5 | 5 | # |
560 | 560 | # Identity of this package. |
561 | 561 | PACKAGE_NAME='realmd' |
562 | 562 | PACKAGE_TARNAME='realmd' |
563 | PACKAGE_VERSION='0.1' | |
564 | PACKAGE_STRING='realmd 0.1' | |
563 | PACKAGE_VERSION='0.2' | |
564 | PACKAGE_STRING='realmd 0.2' | |
565 | 565 | PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=realmd' |
566 | 566 | PACKAGE_URL='' |
567 | 567 | |
606 | 606 | am__EXEEXT_TRUE |
607 | 607 | LTLIBOBJS |
608 | 608 | LIBOBJS |
609 | SERVICE_DIR | |
609 | privatedir | |
610 | 610 | WITH_COVERAGE_FALSE |
611 | 611 | WITH_COVERAGE_TRUE |
612 | 612 | GENHTML |
615 | 615 | TEST_MODE |
616 | 616 | POLKIT_ACTION_DIR |
617 | 617 | DBUS_POLICY_DIR |
618 | DBUS_SERVICES_DIR | |
618 | 619 | KRB5_LIBS |
619 | 620 | KRB5_CFLAGS |
620 | 621 | KRB5_CONFIG |
1340 | 1341 | # Omit some internal or obsolete options to make the list less imposing. |
1341 | 1342 | # This message is too long to be a string in the A/UX 3.1 sh. |
1342 | 1343 | cat <<_ACEOF |
1343 | \`configure' configures realmd 0.1 to adapt to many kinds of systems. | |
1344 | \`configure' configures realmd 0.2 to adapt to many kinds of systems. | |
1344 | 1345 | |
1345 | 1346 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1346 | 1347 | |
1406 | 1407 | |
1407 | 1408 | if test -n "$ac_init_help"; then |
1408 | 1409 | case $ac_init_help in |
1409 | short | recursive ) echo "Configuration of realmd 0.1:";; | |
1410 | short | recursive ) echo "Configuration of realmd 0.2:";; | |
1410 | 1411 | esac |
1411 | 1412 | cat <<\_ACEOF |
1412 | 1413 | |
1526 | 1527 | test -n "$ac_init_help" && exit $ac_status |
1527 | 1528 | if $ac_init_version; then |
1528 | 1529 | cat <<\_ACEOF |
1529 | realmd configure 0.1 | |
1530 | realmd configure 0.2 | |
1530 | 1531 | generated by GNU Autoconf 2.68 |
1531 | 1532 | |
1532 | 1533 | Copyright (C) 2010 Free Software Foundation, Inc. |
1895 | 1896 | This file contains any messages produced by compilers while |
1896 | 1897 | running configure, to aid debugging if configure makes a mistake. |
1897 | 1898 | |
1898 | It was created by realmd $as_me 0.1, which was | |
1899 | It was created by realmd $as_me 0.2, which was | |
1899 | 1900 | generated by GNU Autoconf 2.68. Invocation command line was |
1900 | 1901 | |
1901 | 1902 | $ $0 $@ |
2714 | 2715 | |
2715 | 2716 | # Define the identity of the package. |
2716 | 2717 | PACKAGE='realmd' |
2717 | VERSION='0.1' | |
2718 | VERSION='0.2' | |
2718 | 2719 | |
2719 | 2720 | |
2720 | 2721 | cat >>confdefs.h <<_ACEOF |
7422 | 7423 | # ------------------------------------------------------------------- |
7423 | 7424 | # Directories |
7424 | 7425 | |
7426 | DBUS_SERVICES_DIR="${datadir}/dbus-1/system-services" | |
7427 | ||
7428 | ||
7425 | 7429 | DBUS_POLICY_DIR="${sysconfdir}/dbus-1/system.d" |
7426 | 7430 | |
7427 | 7431 | |
7466 | 7470 | CFLAGS="$SAVE_CFLAGS" |
7467 | 7471 | fi |
7468 | 7472 | done |
7473 | ||
7474 | # Only add this when optimizing is enabled (default) | |
7475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether optimization is enabled" >&5 | |
7476 | $as_echo_n "checking whether optimization is enabled... " >&6; } | |
7477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7478 | /* end confdefs.h. */ | |
7479 | #if __OPTIMIZE__ == 0 | |
7480 | #error No optimization | |
7481 | #endif | |
7482 | ||
7483 | int | |
7484 | main () | |
7485 | { | |
7486 | ||
7487 | ; | |
7488 | return 0; | |
7489 | } | |
7490 | _ACEOF | |
7491 | if ac_fn_c_try_compile "$LINENO"; then : | |
7492 | has_optimization=yes | |
7493 | else | |
7494 | has_optimization=no | |
7495 | fi | |
7496 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7497 | if test $has_optimization = yes; then | |
7498 | CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=2" | |
7499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, fortifying source" >&5 | |
7500 | $as_echo "yes, fortifying source" >&6; } | |
7501 | else | |
7502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not fortifying source" >&5 | |
7503 | $as_echo "no, not fortifying source" >&6; } | |
7504 | fi | |
7469 | 7505 | fi |
7470 | 7506 | |
7471 | 7507 | # Check whether --enable-strict was given. |
7701 | 7737 | # ------------------------------------------------------------------------------ |
7702 | 7738 | # Results |
7703 | 7739 | |
7704 | SERVICE_DIR=$libdir/realmd | |
7740 | privatedir=$libdir/realmd | |
7705 | 7741 | |
7706 | 7742 | |
7707 | 7743 | ac_config_files="$ac_config_files Makefile build/Makefile dbus/Makefile po/Makefile.in po/Makefile service/Makefile tests/Makefile tools/Makefile" |
8256 | 8292 | # report actual input values of CONFIG_FILES etc. instead of their |
8257 | 8293 | # values after options handling. |
8258 | 8294 | ac_log=" |
8259 | This file was extended by realmd $as_me 0.1, which was | |
8295 | This file was extended by realmd $as_me 0.2, which was | |
8260 | 8296 | generated by GNU Autoconf 2.68. Invocation command line was |
8261 | 8297 | |
8262 | 8298 | CONFIG_FILES = $CONFIG_FILES |
8322 | 8358 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
8323 | 8359 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
8324 | 8360 | ac_cs_version="\\ |
8325 | realmd config.status 0.1 | |
8361 | realmd config.status 0.2 | |
8326 | 8362 | configured by $0, generated by GNU Autoconf 2.68, |
8327 | 8363 | with options \\"\$ac_cs_config\\" |
8328 | 8364 |
0 | 0 | AC_PREREQ(2.63) |
1 | 1 | |
2 | AC_INIT([realmd], [0.1], | |
2 | AC_INIT([realmd], [0.2], | |
3 | 3 | [http://bugs.freedesktop.org/enter_bug.cgi?product=realmd], |
4 | 4 | [realmd]) |
5 | 5 | |
121 | 121 | |
122 | 122 | # ------------------------------------------------------------------- |
123 | 123 | # Directories |
124 | ||
125 | DBUS_SERVICES_DIR="${datadir}/dbus-1/system-services" | |
126 | AC_SUBST(DBUS_SERVICES_DIR) | |
124 | 127 | |
125 | 128 | DBUS_POLICY_DIR="${sysconfdir}/dbus-1/system.d" |
126 | 129 | AC_SUBST(DBUS_POLICY_DIR) |
150 | 153 | CFLAGS="$SAVE_CFLAGS" |
151 | 154 | fi |
152 | 155 | done |
156 | ||
157 | # Only add this when optimizing is enabled (default) | |
158 | AC_MSG_CHECKING([whether optimization is enabled]) | |
159 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if __OPTIMIZE__ == 0 | |
160 | #error No optimization | |
161 | #endif | |
162 | ]], [[]])], | |
163 | [has_optimization=yes], | |
164 | [has_optimization=no]) | |
165 | if test $has_optimization = yes; then | |
166 | CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=2" | |
167 | AC_MSG_RESULT([yes, fortifying source]) | |
168 | else | |
169 | AC_MSG_RESULT([no, not fortifying source]) | |
170 | fi | |
153 | 171 | fi |
154 | 172 | |
155 | 173 | AC_ARG_ENABLE(strict, [ |
234 | 252 | # ------------------------------------------------------------------------------ |
235 | 253 | # Results |
236 | 254 | |
237 | SERVICE_DIR=$libdir/realmd | |
238 | AC_SUBST(SERVICE_DIR) | |
255 | privatedir=$libdir/realmd | |
256 | AC_SUBST(privatedir) | |
239 | 257 | |
240 | 258 | AC_CONFIG_FILES([ |
241 | 259 | Makefile |
0 | 0 | include $(top_srcdir)/Makefile.decl |
1 | ||
2 | noinst_LIBRARIES = \ | |
3 | librealm-dbus.a | |
4 | 1 | |
5 | 2 | dbusservicedir = $(DBUS_POLICY_DIR) |
6 | 3 | dbusservice_DATA = \ |
7 | 4 | org.freedesktop.realmd.conf |
5 | ||
6 | providerdir = $(privatedir)/provider.d | |
7 | provider_DATA = \ | |
8 | org.freedesktop.realmd.Samba.provider | |
9 | ||
10 | servicedir = $(DBUS_SERVICES_DIR) | |
11 | service_in_files = \ | |
12 | org.freedesktop.realmd.service.in \ | |
13 | org.freedesktop.realmd.Samba.service.in | |
14 | service_DATA = $(service_in_files:.service.in=.service) | |
15 | ||
16 | noinst_LIBRARIES = \ | |
17 | librealm-dbus.a | |
8 | 18 | |
9 | 19 | BUILT_SOURCES = \ |
10 | 20 | realm-dbus-generated.c realm-dbus-generated.h |
34 | 44 | EXTRA_DIST = \ |
35 | 45 | $(DBUS_XML_DEFINITIONS) \ |
36 | 46 | $(dbusservice_DATA) \ |
47 | $(provider_DATA) \ | |
48 | $(service_in_files) \ | |
37 | 49 | $(NULL) |
38 | 50 | |
39 | 51 | CLEANFILES = \ |
40 | 52 | $(BUILT_SOURCES) \ |
53 | $(service_DATA) \ | |
41 | 54 | *.gcno \ |
42 | 55 | *.gcda \ |
43 | 56 | $(NULL) |
110 | 110 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ |
111 | 111 | $(am__cd) "$$dir" && rm -f $$files; }; \ |
112 | 112 | } |
113 | am__installdirs = "$(DESTDIR)$(dbusservicedir)" | |
114 | DATA = $(dbusservice_DATA) | |
113 | am__installdirs = "$(DESTDIR)$(dbusservicedir)" \ | |
114 | "$(DESTDIR)$(providerdir)" "$(DESTDIR)$(servicedir)" | |
115 | DATA = $(dbusservice_DATA) $(provider_DATA) $(service_DATA) | |
115 | 116 | ETAGS = etags |
116 | 117 | CTAGS = ctags |
117 | 118 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
133 | 134 | CYGPATH_W = @CYGPATH_W@ |
134 | 135 | DATADIRNAME = @DATADIRNAME@ |
135 | 136 | DBUS_POLICY_DIR = @DBUS_POLICY_DIR@ |
137 | DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ | |
136 | 138 | DEFS = @DEFS@ |
137 | 139 | DEPDIR = @DEPDIR@ |
138 | 140 | DISTRO = @DISTRO@ |
202 | 204 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
203 | 205 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
204 | 206 | RANLIB = @RANLIB@ |
205 | SERVICE_DIR = @SERVICE_DIR@ | |
206 | 207 | SET_MAKE = @SET_MAKE@ |
207 | 208 | SHELL = @SHELL@ |
208 | 209 | STRIP = @STRIP@ |
244 | 245 | oldincludedir = @oldincludedir@ |
245 | 246 | pdfdir = @pdfdir@ |
246 | 247 | prefix = @prefix@ |
248 | privatedir = @privatedir@ | |
247 | 249 | program_transform_name = @program_transform_name@ |
248 | 250 | psdir = @psdir@ |
249 | 251 | sbindir = @sbindir@ |
256 | 258 | top_srcdir = @top_srcdir@ |
257 | 259 | NULL = |
258 | 260 | TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions |
259 | noinst_LIBRARIES = \ | |
260 | librealm-dbus.a | |
261 | ||
261 | V_SED = $(V_SED_$(V)) | |
262 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
263 | V_SED_0 = @echo " SED " $@; | |
264 | SED_SUBST = sed \ | |
265 | -e 's,[@]datadir[@],$(datadir),g' \ | |
266 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
267 | -e 's,[@]libdir[@],$(libdir),g' \ | |
268 | -e 's,[@]includedir[@],$(includedir),g' \ | |
269 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
270 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
271 | -e 's,[@]bindir[@],$(bindir),g' \ | |
272 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
273 | -e 's,[@]prefix[@],$(prefix),g' \ | |
274 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
275 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
276 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
277 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
278 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
279 | $(NULL) | |
280 | ||
281 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
262 | 282 | dbusservicedir = $(DBUS_POLICY_DIR) |
263 | 283 | dbusservice_DATA = \ |
264 | 284 | org.freedesktop.realmd.conf |
285 | ||
286 | providerdir = $(privatedir)/provider.d | |
287 | provider_DATA = \ | |
288 | org.freedesktop.realmd.Samba.provider | |
289 | ||
290 | servicedir = $(DBUS_SERVICES_DIR) | |
291 | service_in_files = \ | |
292 | org.freedesktop.realmd.service.in \ | |
293 | org.freedesktop.realmd.Samba.service.in | |
294 | ||
295 | service_DATA = $(service_in_files:.service.in=.service) | |
296 | noinst_LIBRARIES = \ | |
297 | librealm-dbus.a | |
265 | 298 | |
266 | 299 | BUILT_SOURCES = \ |
267 | 300 | realm-dbus-generated.c realm-dbus-generated.h |
286 | 319 | EXTRA_DIST = \ |
287 | 320 | $(DBUS_XML_DEFINITIONS) \ |
288 | 321 | $(dbusservice_DATA) \ |
322 | $(provider_DATA) \ | |
323 | $(service_in_files) \ | |
289 | 324 | $(NULL) |
290 | 325 | |
291 | 326 | CLEANFILES = \ |
292 | 327 | $(BUILT_SOURCES) \ |
328 | $(service_DATA) \ | |
293 | 329 | *.gcno \ |
294 | 330 | *.gcda \ |
295 | 331 | $(NULL) |
301 | 337 | $(MAKE) $(AM_MAKEFLAGS) all-am |
302 | 338 | |
303 | 339 | .SUFFIXES: |
304 | .SUFFIXES: .c .o .obj | |
340 | .SUFFIXES: .conf .conf.in .desktop.in .desktop.in.in .service .service.in .c .o .obj | |
305 | 341 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps) |
306 | 342 | @for dep in $?; do \ |
307 | 343 | case '$(am__configure_deps)' in \ |
394 | 430 | @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ |
395 | 431 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ |
396 | 432 | dir='$(DESTDIR)$(dbusservicedir)'; $(am__uninstall_files_from_dir) |
433 | install-providerDATA: $(provider_DATA) | |
434 | @$(NORMAL_INSTALL) | |
435 | test -z "$(providerdir)" || $(MKDIR_P) "$(DESTDIR)$(providerdir)" | |
436 | @list='$(provider_DATA)'; test -n "$(providerdir)" || list=; \ | |
437 | for p in $$list; do \ | |
438 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | |
439 | echo "$$d$$p"; \ | |
440 | done | $(am__base_list) | \ | |
441 | while read files; do \ | |
442 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(providerdir)'"; \ | |
443 | $(INSTALL_DATA) $$files "$(DESTDIR)$(providerdir)" || exit $$?; \ | |
444 | done | |
445 | ||
446 | uninstall-providerDATA: | |
447 | @$(NORMAL_UNINSTALL) | |
448 | @list='$(provider_DATA)'; test -n "$(providerdir)" || list=; \ | |
449 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | |
450 | dir='$(DESTDIR)$(providerdir)'; $(am__uninstall_files_from_dir) | |
451 | install-serviceDATA: $(service_DATA) | |
452 | @$(NORMAL_INSTALL) | |
453 | test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)" | |
454 | @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ | |
455 | for p in $$list; do \ | |
456 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | |
457 | echo "$$d$$p"; \ | |
458 | done | $(am__base_list) | \ | |
459 | while read files; do \ | |
460 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \ | |
461 | $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \ | |
462 | done | |
463 | ||
464 | uninstall-serviceDATA: | |
465 | @$(NORMAL_UNINSTALL) | |
466 | @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ | |
467 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | |
468 | dir='$(DESTDIR)$(servicedir)'; $(am__uninstall_files_from_dir) | |
397 | 469 | |
398 | 470 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
399 | 471 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
482 | 554 | $(MAKE) $(AM_MAKEFLAGS) check-am |
483 | 555 | all-am: Makefile $(LIBRARIES) $(DATA) |
484 | 556 | installdirs: |
485 | for dir in "$(DESTDIR)$(dbusservicedir)"; do \ | |
557 | for dir in "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(providerdir)" "$(DESTDIR)$(servicedir)"; do \ | |
486 | 558 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ |
487 | 559 | done |
488 | 560 | install: $(BUILT_SOURCES) |
541 | 613 | |
542 | 614 | info-am: |
543 | 615 | |
544 | install-data-am: install-dbusserviceDATA | |
616 | install-data-am: install-dbusserviceDATA install-providerDATA \ | |
617 | install-serviceDATA | |
545 | 618 | |
546 | 619 | install-dvi: install-dvi-am |
547 | 620 | |
586 | 659 | |
587 | 660 | ps-am: |
588 | 661 | |
589 | uninstall-am: uninstall-dbusserviceDATA | |
662 | uninstall-am: uninstall-dbusserviceDATA uninstall-providerDATA \ | |
663 | uninstall-serviceDATA | |
590 | 664 | |
591 | 665 | .MAKE: all check install install-am install-strip |
592 | 666 | |
597 | 671 | install-data-am install-dbusserviceDATA install-dvi \ |
598 | 672 | install-dvi-am install-exec install-exec-am install-html \ |
599 | 673 | install-html-am install-info install-info-am install-man \ |
600 | install-pdf install-pdf-am install-ps install-ps-am \ | |
601 | install-strip installcheck installcheck-am installdirs \ | |
602 | maintainer-clean maintainer-clean-generic mostlyclean \ | |
603 | mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ | |
604 | tags uninstall uninstall-am uninstall-dbusserviceDATA | |
674 | install-pdf install-pdf-am install-providerDATA install-ps \ | |
675 | install-ps-am install-serviceDATA install-strip installcheck \ | |
676 | installcheck-am installdirs maintainer-clean \ | |
677 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | |
678 | mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ | |
679 | uninstall-am uninstall-dbusserviceDATA uninstall-providerDATA \ | |
680 | uninstall-serviceDATA | |
605 | 681 | |
606 | 682 | |
607 | 683 | perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS) |
625 | 701 | @WITH_COVERAGE_TRUE@clear-coverage: |
626 | 702 | @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters |
627 | 703 | |
704 | .desktop.in.in.desktop.in: | |
705 | $(V_SED) $(SED_SUBST) $< > $@ | |
706 | ||
707 | @INTLTOOL_DESKTOP_RULE@ | |
708 | ||
709 | .service.in.service: | |
710 | $(V_SED) $(SED_SUBST) $< > $@ | |
711 | ||
712 | .conf.in.conf: | |
713 | $(V_SED) $(SED_SUBST) $< > $@ | |
714 | ||
628 | 715 | realm-dbus-generated.c: org.freedesktop.realmd.xml |
629 | 716 | $(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.realmd. \ |
630 | 717 | --generate-c-code realm-dbus-generated --c-namespace RealmDbus $< |
0 | [provider] | |
1 | name = org.freedesktop.realmd.Samba | |
2 | type = org.freedesktop.realmd.Kerberos | |
3 | path = /org/freedesktop/realmd/Samba |
11 | 11 | --> |
12 | 12 | <interface name="org.freedesktop.realmd.Provider"> |
13 | 13 | |
14 | <!-- | |
14 | <!-- | |
15 | * The name of the provider | |
16 | --> | |
17 | <property name="Name" type="s" access="read"/> | |
18 | ||
19 | <!-- | |
20 | * A version number for the provider | |
21 | --> | |
22 | <property name="Version" type="s" access="read"/> | |
23 | ||
24 | <!-- | |
15 | 25 | * A list of known, enrolled or discovered realms. |
16 | 26 | * Each realm is a DBus object and is represeted by a: |
17 | 27 | * s: DBus bus name of the realm |
27 | 37 | <method name="Discover"> |
28 | 38 | <!-- The input string --> |
29 | 39 | <arg name="string" type="s" direction="in"/> |
40 | ||
41 | <arg name="operation_id" type="s" direction="in"/> | |
30 | 42 | |
31 | 43 | <!-- Returned match relevance --> |
32 | 44 | <arg name="relevance" type="i" direction="out"/> |
46 | 58 | <interface name="org.freedesktop.realmd.Diagnostics"> |
47 | 59 | <signal name="Diagnostics"> |
48 | 60 | <arg name="data" type="s"/> |
61 | <arg name="operation_id" type="s"/> | |
49 | 62 | </signal> |
50 | 63 | </interface> |
51 | 64 | |
65 | 78 | <property name="Domain" type="s" access="read"/> |
66 | 79 | |
67 | 80 | <!-- |
81 | * The server software, for information only. eg: active-directory | |
82 | --> | |
83 | <property name="Details" type="a{ss}" access="read"/> | |
84 | ||
85 | <!-- | |
68 | 86 | * The suggested Administrator login name for this realm |
69 | 87 | --> |
70 | 88 | <property name="SuggestedAdministrator" type="s" access="read"/> |
82 | 100 | <arg name="principal" type="s" direction="in"/> |
83 | 101 | <arg name="password" type="s" direction="in"/> |
84 | 102 | <arg name="options" type="a{sv}" direction="in"/> |
103 | <arg name="operation_id" type="s" direction="in"/> | |
85 | 104 | </method> |
86 | 105 | |
87 | 106 | <!-- |
94 | 113 | <annotation name="org.gtk.GDBus.C.ForceGVariant" value="yup"/> |
95 | 114 | </arg> |
96 | 115 | <arg name="options" type="a{sv}" direction="in"/> |
116 | <arg name="operation_id" type="s" direction="in"/> | |
97 | 117 | </method> |
98 | 118 | |
99 | 119 | <!-- |
104 | 124 | <arg name="principal" type="s" direction="in"/> |
105 | 125 | <arg name="password" type="s" direction="in"/> |
106 | 126 | <arg name="options" type="a{sv}" direction="in"/> |
127 | <arg name="operation_id" type="s" direction="in"/> | |
107 | 128 | </method> |
108 | 129 | |
109 | 130 | <!-- |
116 | 137 | <annotation name="org.gtk.GDBus.C.ForceGVariant" value="yup"/> |
117 | 138 | </arg> |
118 | 139 | <arg name="options" type="a{sv}" direction="in"/> |
140 | <arg name="operation_id" type="s" direction="in"/> | |
119 | 141 | </method> |
120 | 142 | |
121 | 143 | <!-- |
138 | 160 | <method name="ChangePermittedLogins"> |
139 | 161 | <arg name="add" type="as" direction="in"/> |
140 | 162 | <arg name="remove" type="as" direction="in"/> |
163 | <arg name="operation_id" type="s" direction="in"/> | |
141 | 164 | </method> |
142 | 165 | |
143 | 166 | </interface> |
0 | 0 | include $(top_srcdir)/Makefile.decl |
1 | 1 | |
2 | service_PROGRAMS = \ | |
2 | private_PROGRAMS = \ | |
3 | 3 | realmd |
4 | 4 | |
5 | 5 | REALMD_CONFIGS = \ |
6 | 6 | realmd-defaults.conf \ |
7 | 7 | realmd-redhat.conf |
8 | 8 | |
9 | servicedir = $(SERVICE_DIR) | |
10 | service_DATA = \ | |
9 | private_DATA = \ | |
11 | 10 | net-ads-smb.conf \ |
12 | 11 | realmd-defaults.conf |
13 | ||
14 | providerdir = $(SERVICE_DIR)/provider.d | |
15 | provider_DATA = \ | |
16 | org.freedesktop.realmd.Samba.provider | |
17 | 12 | |
18 | 13 | polkit_policydir = $(POLKIT_ACTION_DIR) |
19 | 14 | polkit_policy_in_files = org.freedesktop.realmd.policy.in |
48 | 43 | realmd_CFLAGS = \ |
49 | 44 | -I$(top_srcdir)/dbus \ |
50 | 45 | -I$(top_builddir)/dbus \ |
51 | -DSERVICE_DIR="\"$(servicedir)\"" \ | |
46 | -DPRIVATE_DIR="\"$(privatedir)\"" \ | |
52 | 47 | -DSYSCONF_DIR="\"$(sysconfdir)\"" \ |
53 | -DPROVIDER_DIR="\"$(providerdir)\"" \ | |
48 | -DPROVIDER_DIR="\"$(privatedir)/provider.d\"" \ | |
54 | 49 | $(PACKAGEKIT_CFLAGS) \ |
55 | 50 | $(POLKIT_CFLAGS) \ |
56 | 51 | $(GLIB_CFLAGS) \ |
67 | 62 | |
68 | 63 | # Install and uninstall the config for this distro |
69 | 64 | install-data-local: |
70 | $(INSTALL_PROGRAM) -d $(servicedir) | |
71 | $(INSTALL_DATA) $(srcdir)/realmd-$(DISTRO).conf $(servicedir)/realmd-distro.conf | |
65 | $(INSTALL_PROGRAM) -d $(privatedir) | |
66 | $(INSTALL_DATA) $(srcdir)/realmd-$(DISTRO).conf $(privatedir)/realmd-distro.conf | |
72 | 67 | uninstall-local: |
73 | rm -f $(servicedir)/realmd-distro.conf | |
68 | rm -f $(privatedir)/realmd-distro.conf | |
74 | 69 | |
75 | 70 | # ------------------------------------------------------------------ |
76 | 71 | |
77 | 72 | EXTRA_DIST = \ |
78 | 73 | $(polkit_policy_in_files) \ |
79 | 74 | $(REALMD_CONFIGS) \ |
80 | $(service_DATA) \ | |
75 | $(private_DATA) \ | |
81 | 76 | $(provider_DATA) \ |
82 | 77 | $(NULL) |
83 | 78 |
34 | 34 | POST_UNINSTALL = : |
35 | 35 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ |
36 | 36 | $(top_srcdir)/Makefile.decl |
37 | service_PROGRAMS = realmd$(EXEEXT) | |
37 | private_PROGRAMS = realmd$(EXEEXT) | |
38 | 38 | subdir = service |
39 | 39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
40 | 40 | am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \ |
45 | 45 | CONFIG_HEADER = $(top_builddir)/config.h |
46 | 46 | CONFIG_CLEAN_FILES = |
47 | 47 | CONFIG_CLEAN_VPATH_FILES = |
48 | am__installdirs = "$(DESTDIR)$(servicedir)" \ | |
49 | "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(providerdir)" \ | |
50 | "$(DESTDIR)$(servicedir)" | |
51 | PROGRAMS = $(service_PROGRAMS) | |
48 | am__installdirs = "$(DESTDIR)$(privatedir)" \ | |
49 | "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(privatedir)" | |
50 | PROGRAMS = $(private_PROGRAMS) | |
52 | 51 | am__objects_1 = |
53 | 52 | am_realmd_OBJECTS = realmd-realm-ad-discover.$(OBJEXT) \ |
54 | 53 | realmd-realm-all-provider.$(OBJEXT) \ |
128 | 127 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ |
129 | 128 | $(am__cd) "$$dir" && rm -f $$files; }; \ |
130 | 129 | } |
131 | DATA = $(polkit_policy_DATA) $(provider_DATA) $(service_DATA) | |
130 | DATA = $(polkit_policy_DATA) $(private_DATA) | |
132 | 131 | ETAGS = etags |
133 | 132 | CTAGS = ctags |
134 | 133 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
150 | 149 | CYGPATH_W = @CYGPATH_W@ |
151 | 150 | DATADIRNAME = @DATADIRNAME@ |
152 | 151 | DBUS_POLICY_DIR = @DBUS_POLICY_DIR@ |
152 | DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ | |
153 | 153 | DEFS = @DEFS@ |
154 | 154 | DEPDIR = @DEPDIR@ |
155 | 155 | DISTRO = @DISTRO@ |
219 | 219 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
220 | 220 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
221 | 221 | RANLIB = @RANLIB@ |
222 | SERVICE_DIR = @SERVICE_DIR@ | |
223 | 222 | SET_MAKE = @SET_MAKE@ |
224 | 223 | SHELL = @SHELL@ |
225 | 224 | STRIP = @STRIP@ |
261 | 260 | oldincludedir = @oldincludedir@ |
262 | 261 | pdfdir = @pdfdir@ |
263 | 262 | prefix = @prefix@ |
263 | privatedir = @privatedir@ | |
264 | 264 | program_transform_name = @program_transform_name@ |
265 | 265 | psdir = @psdir@ |
266 | 266 | sbindir = @sbindir@ |
273 | 273 | top_srcdir = @top_srcdir@ |
274 | 274 | NULL = |
275 | 275 | TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions |
276 | V_SED = $(V_SED_$(V)) | |
277 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
278 | V_SED_0 = @echo " SED " $@; | |
279 | SED_SUBST = sed \ | |
280 | -e 's,[@]datadir[@],$(datadir),g' \ | |
281 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
282 | -e 's,[@]libdir[@],$(libdir),g' \ | |
283 | -e 's,[@]includedir[@],$(includedir),g' \ | |
284 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
285 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
286 | -e 's,[@]bindir[@],$(bindir),g' \ | |
287 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
288 | -e 's,[@]prefix[@],$(prefix),g' \ | |
289 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
290 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
291 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
292 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
293 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
294 | $(NULL) | |
295 | ||
296 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
276 | 297 | REALMD_CONFIGS = \ |
277 | 298 | realmd-defaults.conf \ |
278 | 299 | realmd-redhat.conf |
279 | 300 | |
280 | servicedir = $(SERVICE_DIR) | |
281 | service_DATA = \ | |
301 | private_DATA = \ | |
282 | 302 | net-ads-smb.conf \ |
283 | 303 | realmd-defaults.conf |
284 | ||
285 | providerdir = $(SERVICE_DIR)/provider.d | |
286 | provider_DATA = \ | |
287 | org.freedesktop.realmd.Samba.provider | |
288 | 304 | |
289 | 305 | polkit_policydir = $(POLKIT_ACTION_DIR) |
290 | 306 | polkit_policy_in_files = org.freedesktop.realmd.policy.in |
317 | 333 | realmd_CFLAGS = \ |
318 | 334 | -I$(top_srcdir)/dbus \ |
319 | 335 | -I$(top_builddir)/dbus \ |
320 | -DSERVICE_DIR="\"$(servicedir)\"" \ | |
336 | -DPRIVATE_DIR="\"$(privatedir)\"" \ | |
321 | 337 | -DSYSCONF_DIR="\"$(sysconfdir)\"" \ |
322 | -DPROVIDER_DIR="\"$(providerdir)\"" \ | |
338 | -DPROVIDER_DIR="\"$(privatedir)/provider.d\"" \ | |
323 | 339 | $(PACKAGEKIT_CFLAGS) \ |
324 | 340 | $(POLKIT_CFLAGS) \ |
325 | 341 | $(GLIB_CFLAGS) \ |
339 | 355 | EXTRA_DIST = \ |
340 | 356 | $(polkit_policy_in_files) \ |
341 | 357 | $(REALMD_CONFIGS) \ |
342 | $(service_DATA) \ | |
358 | $(private_DATA) \ | |
343 | 359 | $(provider_DATA) \ |
344 | 360 | $(NULL) |
345 | 361 | |
356 | 372 | all: all-am |
357 | 373 | |
358 | 374 | .SUFFIXES: |
359 | .SUFFIXES: .c .o .obj | |
375 | .SUFFIXES: .conf .conf.in .desktop.in .desktop.in.in .service .service.in .c .o .obj | |
360 | 376 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps) |
361 | 377 | @for dep in $?; do \ |
362 | 378 | case '$(am__configure_deps)' in \ |
388 | 404 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) |
389 | 405 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
390 | 406 | $(am__aclocal_m4_deps): |
391 | install-servicePROGRAMS: $(service_PROGRAMS) | |
407 | install-privatePROGRAMS: $(private_PROGRAMS) | |
392 | 408 | @$(NORMAL_INSTALL) |
393 | test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)" | |
394 | @list='$(service_PROGRAMS)'; test -n "$(servicedir)" || list=; \ | |
409 | test -z "$(privatedir)" || $(MKDIR_P) "$(DESTDIR)$(privatedir)" | |
410 | @list='$(private_PROGRAMS)'; test -n "$(privatedir)" || list=; \ | |
395 | 411 | for p in $$list; do echo "$$p $$p"; done | \ |
396 | 412 | sed 's/$(EXEEXT)$$//' | \ |
397 | 413 | while read p p1; do if test -f $$p; \ |
408 | 424 | while read type dir files; do \ |
409 | 425 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ |
410 | 426 | test -z "$$files" || { \ |
411 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(servicedir)$$dir'"; \ | |
412 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(servicedir)$$dir" || exit $$?; \ | |
427 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(privatedir)$$dir'"; \ | |
428 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(privatedir)$$dir" || exit $$?; \ | |
413 | 429 | } \ |
414 | 430 | ; done |
415 | 431 | |
416 | uninstall-servicePROGRAMS: | |
432 | uninstall-privatePROGRAMS: | |
417 | 433 | @$(NORMAL_UNINSTALL) |
418 | @list='$(service_PROGRAMS)'; test -n "$(servicedir)" || list=; \ | |
434 | @list='$(private_PROGRAMS)'; test -n "$(privatedir)" || list=; \ | |
419 | 435 | files=`for p in $$list; do echo "$$p"; done | \ |
420 | 436 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ |
421 | 437 | -e 's/$$/$(EXEEXT)/' `; \ |
422 | 438 | test -n "$$list" || exit 0; \ |
423 | echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \ | |
424 | cd "$(DESTDIR)$(servicedir)" && rm -f $$files | |
425 | ||
426 | clean-servicePROGRAMS: | |
427 | -test -z "$(service_PROGRAMS)" || rm -f $(service_PROGRAMS) | |
439 | echo " ( cd '$(DESTDIR)$(privatedir)' && rm -f" $$files ")"; \ | |
440 | cd "$(DESTDIR)$(privatedir)" && rm -f $$files | |
441 | ||
442 | clean-privatePROGRAMS: | |
443 | -test -z "$(private_PROGRAMS)" || rm -f $(private_PROGRAMS) | |
428 | 444 | realmd$(EXEEXT): $(realmd_OBJECTS) $(realmd_DEPENDENCIES) $(EXTRA_realmd_DEPENDENCIES) |
429 | 445 | @rm -f realmd$(EXEEXT) |
430 | 446 | $(AM_V_CCLD)$(realmd_LINK) $(realmd_OBJECTS) $(realmd_LDADD) $(LIBS) |
797 | 813 | @list='$(polkit_policy_DATA)'; test -n "$(polkit_policydir)" || list=; \ |
798 | 814 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ |
799 | 815 | dir='$(DESTDIR)$(polkit_policydir)'; $(am__uninstall_files_from_dir) |
800 | install-providerDATA: $(provider_DATA) | |
816 | install-privateDATA: $(private_DATA) | |
801 | 817 | @$(NORMAL_INSTALL) |
802 | test -z "$(providerdir)" || $(MKDIR_P) "$(DESTDIR)$(providerdir)" | |
803 | @list='$(provider_DATA)'; test -n "$(providerdir)" || list=; \ | |
818 | test -z "$(privatedir)" || $(MKDIR_P) "$(DESTDIR)$(privatedir)" | |
819 | @list='$(private_DATA)'; test -n "$(privatedir)" || list=; \ | |
804 | 820 | for p in $$list; do \ |
805 | 821 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ |
806 | 822 | echo "$$d$$p"; \ |
807 | 823 | done | $(am__base_list) | \ |
808 | 824 | while read files; do \ |
809 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(providerdir)'"; \ | |
810 | $(INSTALL_DATA) $$files "$(DESTDIR)$(providerdir)" || exit $$?; \ | |
825 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(privatedir)'"; \ | |
826 | $(INSTALL_DATA) $$files "$(DESTDIR)$(privatedir)" || exit $$?; \ | |
811 | 827 | done |
812 | 828 | |
813 | uninstall-providerDATA: | |
829 | uninstall-privateDATA: | |
814 | 830 | @$(NORMAL_UNINSTALL) |
815 | @list='$(provider_DATA)'; test -n "$(providerdir)" || list=; \ | |
831 | @list='$(private_DATA)'; test -n "$(privatedir)" || list=; \ | |
816 | 832 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ |
817 | dir='$(DESTDIR)$(providerdir)'; $(am__uninstall_files_from_dir) | |
818 | install-serviceDATA: $(service_DATA) | |
819 | @$(NORMAL_INSTALL) | |
820 | test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)" | |
821 | @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ | |
822 | for p in $$list; do \ | |
823 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | |
824 | echo "$$d$$p"; \ | |
825 | done | $(am__base_list) | \ | |
826 | while read files; do \ | |
827 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \ | |
828 | $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \ | |
829 | done | |
830 | ||
831 | uninstall-serviceDATA: | |
832 | @$(NORMAL_UNINSTALL) | |
833 | @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ | |
834 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | |
835 | dir='$(DESTDIR)$(servicedir)'; $(am__uninstall_files_from_dir) | |
833 | dir='$(DESTDIR)$(privatedir)'; $(am__uninstall_files_from_dir) | |
836 | 834 | |
837 | 835 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
838 | 836 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
920 | 918 | check: check-am |
921 | 919 | all-am: Makefile $(PROGRAMS) $(DATA) |
922 | 920 | installdirs: |
923 | for dir in "$(DESTDIR)$(servicedir)" "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(providerdir)" "$(DESTDIR)$(servicedir)"; do \ | |
921 | for dir in "$(DESTDIR)$(privatedir)" "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(privatedir)"; do \ | |
924 | 922 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ |
925 | 923 | done |
926 | 924 | install: install-am |
957 | 955 | @echo "it deletes files that may require special tools to rebuild." |
958 | 956 | clean: clean-am |
959 | 957 | |
960 | clean-am: clean-generic clean-servicePROGRAMS mostlyclean-am | |
958 | clean-am: clean-generic clean-privatePROGRAMS mostlyclean-am | |
961 | 959 | |
962 | 960 | distclean: distclean-am |
963 | 961 | -rm -rf ./$(DEPDIR) |
978 | 976 | info-am: |
979 | 977 | |
980 | 978 | install-data-am: install-data-local install-polkit_policyDATA \ |
981 | install-providerDATA install-serviceDATA \ | |
982 | install-servicePROGRAMS | |
979 | install-privateDATA install-privatePROGRAMS | |
983 | 980 | |
984 | 981 | install-dvi: install-dvi-am |
985 | 982 | |
1025 | 1022 | ps-am: |
1026 | 1023 | |
1027 | 1024 | uninstall-am: uninstall-local uninstall-polkit_policyDATA \ |
1028 | uninstall-providerDATA uninstall-serviceDATA \ | |
1029 | uninstall-servicePROGRAMS | |
1025 | uninstall-privateDATA uninstall-privatePROGRAMS | |
1030 | 1026 | |
1031 | 1027 | .MAKE: install-am install-strip |
1032 | 1028 | |
1033 | 1029 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ |
1034 | clean-servicePROGRAMS ctags distclean distclean-compile \ | |
1030 | clean-privatePROGRAMS ctags distclean distclean-compile \ | |
1035 | 1031 | distclean-generic distclean-tags distdir dvi dvi-am html \ |
1036 | 1032 | html-am info info-am install install-am install-data \ |
1037 | 1033 | install-data-am install-data-local install-dvi install-dvi-am \ |
1038 | 1034 | install-exec install-exec-am install-html install-html-am \ |
1039 | 1035 | install-info install-info-am install-man install-pdf \ |
1040 | install-pdf-am install-polkit_policyDATA install-providerDATA \ | |
1041 | install-ps install-ps-am install-serviceDATA \ | |
1042 | install-servicePROGRAMS install-strip installcheck \ | |
1043 | installcheck-am installdirs maintainer-clean \ | |
1036 | install-pdf-am install-polkit_policyDATA install-privateDATA \ | |
1037 | install-privatePROGRAMS install-ps install-ps-am install-strip \ | |
1038 | installcheck installcheck-am installdirs maintainer-clean \ | |
1044 | 1039 | maintainer-clean-generic mostlyclean mostlyclean-compile \ |
1045 | 1040 | mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ |
1046 | 1041 | uninstall-am uninstall-local uninstall-polkit_policyDATA \ |
1047 | uninstall-providerDATA uninstall-serviceDATA \ | |
1048 | uninstall-servicePROGRAMS | |
1042 | uninstall-privateDATA uninstall-privatePROGRAMS | |
1049 | 1043 | |
1050 | 1044 | |
1051 | 1045 | perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS) |
1068 | 1062 | |
1069 | 1063 | @WITH_COVERAGE_TRUE@clear-coverage: |
1070 | 1064 | @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters |
1065 | ||
1066 | .desktop.in.in.desktop.in: | |
1067 | $(V_SED) $(SED_SUBST) $< > $@ | |
1068 | ||
1069 | @INTLTOOL_DESKTOP_RULE@ | |
1070 | ||
1071 | .service.in.service: | |
1072 | $(V_SED) $(SED_SUBST) $< > $@ | |
1073 | ||
1074 | .conf.in.conf: | |
1075 | $(V_SED) $(SED_SUBST) $< > $@ | |
1071 | 1076 | @INTLTOOL_POLICY_RULE@ |
1072 | 1077 | |
1073 | 1078 | # Install and uninstall the config for this distro |
1074 | 1079 | install-data-local: |
1075 | $(INSTALL_PROGRAM) -d $(servicedir) | |
1076 | $(INSTALL_DATA) $(srcdir)/realmd-$(DISTRO).conf $(servicedir)/realmd-distro.conf | |
1080 | $(INSTALL_PROGRAM) -d $(privatedir) | |
1081 | $(INSTALL_DATA) $(srcdir)/realmd-$(DISTRO).conf $(privatedir)/realmd-distro.conf | |
1077 | 1082 | uninstall-local: |
1078 | rm -f $(servicedir)/realmd-distro.conf | |
1083 | rm -f $(privatedir)/realmd-distro.conf | |
1079 | 1084 | |
1080 | 1085 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
1081 | 1086 | # Otherwise a system limit (for SysV at least) may be exceeded. |
0 | [provider] | |
1 | name = org.freedesktop.realmd.Samba | |
2 | type = org.freedesktop.realmd.Kerberos | |
3 | path = /org/freedesktop/realmd/Samba |
159 | 159 | g_assert (discover->domain != NULL); |
160 | 160 | |
161 | 161 | realm_diagnostics_info (discover->invocation, |
162 | "Searching for kerberos SRV records on %s domain", | |
162 | "Searching for kerberos SRV records for domain: _kerberos._udp.%s", | |
163 | 163 | discover->domain); |
164 | 164 | |
165 | 165 | resolver = g_resolver_get_default (); |
166 | 166 | g_resolver_lookup_service_async (resolver, "kerberos", "udp", discover->domain, NULL, |
167 | 167 | on_resolve_kerberos_srv, g_object_ref (res)); |
168 | 168 | |
169 | realm_diagnostics_info (discover->invocation, | |
170 | "Searching for _msdcs zone on %s domain", | |
171 | discover->domain); | |
172 | ||
173 | 169 | /* Active Directory DNS zones have this subzone */ |
174 | 170 | msdcs = g_strdup_printf ("_msdcs.%s", discover->domain); |
171 | ||
172 | realm_diagnostics_info (discover->invocation, | |
173 | "Searching for sub zone on domain: %s", | |
174 | msdcs); | |
175 | 175 | |
176 | 176 | g_resolver_lookup_records_async (resolver, msdcs, G_RESOLVER_RECORD_SOA, NULL, |
177 | 177 | on_resolve_msdcs_soa, g_object_ref (res)); |
263 | 263 | if (!discover->found_kerberos_srv || !discover->found_msdcs_soa) |
264 | 264 | return NULL; |
265 | 265 | |
266 | realm = g_ascii_strup (discover->domain, -1); | |
267 | ||
266 | 268 | if (discovery) { |
267 | 269 | *discovery = realm_discovery_new (); |
268 | 270 | |
271 | 273 | discover->domain); |
272 | 274 | |
273 | 275 | /* The realm */ |
274 | realm = g_ascii_strup (discover->domain, -1); | |
275 | 276 | realm_discovery_add_string (*discovery, REALM_DBUS_DISCOVERY_REALM, realm); |
276 | 277 | |
277 | 278 | /* The servers */ |
283 | 284 | "kerberos-ad"); |
284 | 285 | } |
285 | 286 | |
287 | realm_diagnostics_info (discover->invocation, "Successfully discovered realm: %s", realm); | |
286 | 288 | return realm; |
287 | 289 | } |
17 | 17 | #include "realm-daemon.h" |
18 | 18 | #define DEBUG_FLAG REALM_DEBUG_PROVIDER |
19 | 19 | #include "realm-debug.h" |
20 | #include "realm-diagnostics.h" | |
20 | 21 | #include "realm-errors.h" |
21 | 22 | #include "realm-dbus-constants.h" |
22 | 23 | #include "realm-dbus-generated.h" |
25 | 26 | #include <glib/gstdio.h> |
26 | 27 | |
27 | 28 | #include <errno.h> |
29 | #include <string.h> | |
30 | ||
31 | typedef struct { | |
32 | GDBusProxy *proxy; | |
33 | guint diagnostics_sig; | |
34 | } ProviderProxy; | |
28 | 35 | |
29 | 36 | struct _RealmAllProvider { |
30 | 37 | RealmProvider parent; |
31 | 38 | GList *providers; |
39 | GHashTable *invocations; | |
32 | 40 | }; |
33 | 41 | |
34 | 42 | typedef struct { |
36 | 44 | } RealmAllProviderClass; |
37 | 45 | |
38 | 46 | static guint provider_owner_id = 0; |
47 | static guint operation_unique_id = 0; | |
39 | 48 | |
40 | 49 | static void realm_all_provider_async_initable_iface (GAsyncInitableIface *iface); |
41 | 50 | |
46 | 55 | static void |
47 | 56 | realm_all_provider_init (RealmAllProvider *self) |
48 | 57 | { |
49 | ||
58 | self->invocations = g_hash_table_new_full (g_str_hash, g_str_equal, | |
59 | g_free, g_object_unref); | |
60 | ||
61 | /* The dbus Name property of the provider */ | |
62 | g_object_set (self, "name", "All", NULL); | |
50 | 63 | } |
51 | 64 | |
52 | 65 | static gboolean |
60 | 73 | |
61 | 74 | g_assert (name != NULL); |
62 | 75 | g_assert (path != NULL); |
76 | ||
77 | *name = NULL; | |
78 | *path = NULL; | |
63 | 79 | |
64 | 80 | key_file = g_key_file_new (); |
65 | 81 | g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, &error); |
122 | 138 | update_realms_property (RealmAllProvider *self) |
123 | 139 | { |
124 | 140 | GQueue realms = G_QUEUE_INIT; |
141 | ProviderProxy *prov; | |
125 | 142 | GVariant *variant; |
126 | 143 | GList *l; |
127 | 144 | |
128 | 145 | for (l = self->providers; l != NULL; l = g_list_next (l)) { |
129 | variant = g_dbus_proxy_get_cached_property (l->data, "Realms"); | |
146 | prov = l->data; | |
147 | variant = g_dbus_proxy_get_cached_property (prov->proxy, "Realms"); | |
130 | 148 | if (variant) |
131 | 149 | g_queue_push_tail (&realms, variant); |
132 | 150 | } |
154 | 172 | |
155 | 173 | typedef struct { |
156 | 174 | GDBusMethodInvocation *invocation; |
175 | gchar *operation_id; | |
157 | 176 | gint outstanding; |
158 | 177 | GQueue failures; |
159 | 178 | GQueue results; |
165 | 184 | discover_closure_free (gpointer data) |
166 | 185 | { |
167 | 186 | DiscoverClosure *discover = data; |
187 | g_free (discover->operation_id); | |
168 | 188 | g_object_unref (discover->invocation); |
169 | 189 | while (!g_queue_is_empty (&discover->results)) |
170 | 190 | g_variant_unref (g_queue_pop_head (&discover->results)); |
245 | 265 | { |
246 | 266 | GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data); |
247 | 267 | DiscoverClosure *discover = g_simple_async_result_get_op_res_gpointer (res); |
268 | RealmAllProvider *self = REALM_ALL_PROVIDER (g_async_result_get_source_object (user_data)); | |
248 | 269 | GError *error = NULL; |
249 | 270 | GVariant *retval; |
250 | 271 | |
259 | 280 | |
260 | 281 | /* All done at this point? */ |
261 | 282 | if (discover->outstanding == 0) { |
283 | g_hash_table_remove (self->invocations, discover->operation_id); | |
262 | 284 | discover_process_results (res, discover); |
263 | 285 | g_simple_async_result_complete (res); |
264 | 286 | } |
265 | 287 | |
266 | 288 | g_object_unref (res); |
289 | g_object_unref (self); | |
267 | 290 | } |
268 | 291 | |
269 | 292 | static void |
276 | 299 | RealmAllProvider *self = REALM_ALL_PROVIDER (provider); |
277 | 300 | GSimpleAsyncResult *res; |
278 | 301 | DiscoverClosure *discover; |
302 | ProviderProxy *prov; | |
279 | 303 | GList *l; |
280 | 304 | |
281 | 305 | res = g_simple_async_result_new (G_OBJECT (self), callback, user_data, |
282 | 306 | realm_all_provider_discover_async); |
283 | 307 | discover = g_slice_new0 (DiscoverClosure); |
308 | discover->invocation = g_object_ref (invocation); | |
309 | discover->operation_id = g_strdup_printf ("realm-all-provider-%d", operation_unique_id++); | |
284 | 310 | g_simple_async_result_set_op_res_gpointer (res, discover, discover_closure_free); |
285 | 311 | |
286 | 312 | for (l = self->providers; l != NULL; l = g_list_next (l)) { |
287 | g_dbus_proxy_call (l->data, "Discover", g_variant_new ("(s)", string), | |
313 | prov = l->data; | |
314 | g_dbus_proxy_call (prov->proxy, "Discover", | |
315 | g_variant_new ("(ss)", string, discover->operation_id), | |
288 | 316 | G_DBUS_CALL_FLAGS_NONE, G_MAXINT, NULL, |
289 | 317 | on_proxy_discover, g_object_ref (res)); |
290 | 318 | discover->outstanding++; |
291 | 319 | } |
292 | 320 | |
321 | /* If no discovery going on then just complete */ | |
293 | 322 | if (discover->outstanding == 0) { |
294 | 323 | discover_process_results (res, discover); |
295 | 324 | g_simple_async_result_complete_in_idle (res); |
296 | } | |
325 | ||
326 | /* Here we mark down our operation_id so diagnostics work */ | |
327 | } else { | |
328 | g_hash_table_insert (self->invocations, | |
329 | g_strdup (discover->operation_id), | |
330 | g_object_ref (invocation)); | |
331 | } | |
332 | ||
333 | g_object_unref (res); | |
297 | 334 | } |
298 | 335 | |
299 | 336 | static gint |
320 | 357 | realm_all_provider_finalize (GObject *obj) |
321 | 358 | { |
322 | 359 | RealmAllProvider *self = REALM_ALL_PROVIDER (obj); |
323 | ||
324 | g_list_free_full (self->providers, g_object_unref); | |
360 | ProviderProxy *prov; | |
361 | GList *l; | |
362 | ||
363 | for (l = self->providers; l != NULL; l = g_list_next (l)) { | |
364 | prov = l->data; | |
365 | if (prov->diagnostics_sig) { | |
366 | g_dbus_connection_signal_unsubscribe (g_dbus_proxy_get_connection (prov->proxy), | |
367 | prov->diagnostics_sig); | |
368 | } | |
369 | g_object_unref (prov->proxy); | |
370 | g_slice_free (ProviderProxy, prov); | |
371 | } | |
372 | g_list_free (self->providers); | |
373 | ||
374 | g_hash_table_destroy (self->invocations); | |
325 | 375 | |
326 | 376 | G_OBJECT_CLASS (realm_all_provider_parent_class)->finalize (obj); |
327 | 377 | } |
350 | 400 | } |
351 | 401 | |
352 | 402 | static void |
353 | on_provider_proxy (GObject *source, | |
354 | GAsyncResult *result, | |
355 | gpointer user_data) | |
403 | on_provider_proxy_diagnostics (GDBusConnection *connection, | |
404 | const gchar *sender_name, | |
405 | const gchar *object_path, | |
406 | const gchar *interface_name, | |
407 | const gchar *signal_name, | |
408 | GVariant *parameters, | |
409 | gpointer user_data) | |
410 | { | |
411 | RealmAllProvider *self = REALM_ALL_PROVIDER (user_data); | |
412 | GDBusMethodInvocation *invocation; | |
413 | const gchar *operation_id; | |
414 | const gchar *data; | |
415 | ||
416 | /* Here we relay diagnostic information from separate providers back to caller */ | |
417 | g_return_if_fail (g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(ss)"))); | |
418 | g_variant_get (parameters, "(&s&s)", &data, &operation_id); | |
419 | invocation = g_hash_table_lookup (self->invocations, operation_id); | |
420 | if (invocation != NULL) | |
421 | realm_diagnostics_signal (invocation, data); | |
422 | } | |
423 | ||
424 | static void | |
425 | on_provider_proxy_created (GObject *source, | |
426 | GAsyncResult *result, | |
427 | gpointer user_data) | |
356 | 428 | { |
357 | 429 | GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data); |
358 | 430 | InitClosure *init = g_simple_async_result_get_op_res_gpointer (res); |
359 | 431 | RealmAllProvider *self = REALM_ALL_PROVIDER (g_async_result_get_source_object (user_data)); |
360 | 432 | GDBusProxy *proxy; |
433 | ProviderProxy *prov; | |
361 | 434 | GError *error = NULL; |
435 | guint sig; | |
362 | 436 | |
363 | 437 | proxy = g_dbus_proxy_new_for_bus_finish (result, &error); |
364 | 438 | if (error == NULL) { |
365 | 439 | g_signal_connect (proxy, "g-properties-changed", |
366 | 440 | G_CALLBACK (on_proxy_properties_changed), self); |
367 | self->providers = g_list_prepend (self->providers, proxy); | |
441 | ||
442 | sig = g_dbus_connection_signal_subscribe (g_dbus_proxy_get_connection (proxy), | |
443 | g_dbus_proxy_get_name (proxy), | |
444 | "org.freedesktop.realmd.Diagnostics", | |
445 | "Diagnostics", | |
446 | g_dbus_proxy_get_object_path (proxy), | |
447 | NULL, | |
448 | G_DBUS_SIGNAL_FLAGS_NONE, | |
449 | on_provider_proxy_diagnostics, | |
450 | self, NULL); | |
451 | ||
452 | prov = g_slice_new0 (ProviderProxy); | |
453 | prov->proxy = proxy; | |
454 | prov->diagnostics_sig = sig; | |
455 | self->providers = g_list_prepend (self->providers, prov); | |
456 | ||
368 | 457 | } else { |
369 | 458 | g_warning ("Couldn't load realm provider: %s", error->message); |
370 | 459 | g_error_free (error); |
430 | 519 | realm_dbus_provider_interface_info (), |
431 | 520 | provider_name, provider_path, |
432 | 521 | REALM_DBUS_PROVIDER_INTERFACE, |
433 | cancellable, on_provider_proxy, | |
522 | cancellable, on_provider_proxy_created, | |
434 | 523 | g_object_ref (res)); |
524 | ||
525 | realm_debug ("Initializing provider: %s", provider_name); | |
526 | ||
435 | 527 | g_free (provider_name); |
436 | 528 | g_free (provider_path); |
437 | 529 | init->outstanding++; |
440 | 532 | g_free (filename); |
441 | 533 | } |
442 | 534 | |
443 | if (init->outstanding == 0) | |
535 | if (init->outstanding == 0) { | |
536 | realm_debug ("No realm providers found"); | |
444 | 537 | g_simple_async_result_complete_in_idle (res); |
538 | } | |
445 | 539 | |
446 | 540 | g_object_unref (res); |
447 | 541 | } |
41 | 41 | { "diagnostics", REALM_DEBUG_DIAGNOSTICS }, |
42 | 42 | { "daemon", REALM_DEBUG_SERVICE }, |
43 | 43 | { "packages", REALM_DEBUG_PACKAGES }, |
44 | { "provider", REALM_DEBUG_PROVIDER }, | |
44 | 45 | { 0, } |
45 | 46 | }; |
46 | 47 | |
69 | 70 | { |
70 | 71 | GString *gstring; |
71 | 72 | const gchar *progname; |
73 | int ret; | |
72 | 74 | |
73 | 75 | gstring = g_string_new (NULL); |
74 | 76 | |
78 | 80 | log_domain ? log_domain : "", log_domain ? "-" : "", |
79 | 81 | message ? message : "(NULL) message"); |
80 | 82 | |
81 | write (1, gstring->str, gstring->len); | |
83 | ret = write (1, gstring->str, gstring->len); | |
84 | ||
85 | /* Yes this is dumb, but gets around compiler warning */ | |
86 | if (ret < 0) | |
87 | g_warning ("couldn't write debug output"); | |
88 | ||
82 | 89 | g_string_free (gstring, TRUE); |
83 | 90 | } |
84 | 91 |
23 | 23 | |
24 | 24 | static GDBusConnection *the_connection = NULL; |
25 | 25 | static GString *line_buffer = NULL; |
26 | static GQuark operation_id_quark = 0; | |
26 | 27 | |
27 | 28 | void |
28 | 29 | realm_diagnostics_initialize (GDBusConnection *connection) |
35 | 36 | |
36 | 37 | the_connection = connection; |
37 | 38 | g_object_add_weak_pointer (G_OBJECT (the_connection), (gpointer *)&the_connection); |
39 | ||
40 | operation_id_quark = g_quark_from_static_string ("realm-diagnostics-operation-id"); | |
41 | } | |
42 | ||
43 | void | |
44 | realm_diagnostics_mark_operation (GDBusMethodInvocation *invocation, | |
45 | const gchar *operation_id) | |
46 | { | |
47 | g_return_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation)); | |
48 | g_return_if_fail (operation_id != NULL); | |
49 | ||
50 | g_object_set_qdata_full (G_OBJECT (invocation), operation_id_quark, | |
51 | g_strdup (operation_id), g_free); | |
38 | 52 | } |
39 | 53 | |
40 | 54 | static void |
79 | 93 | gchar *string) |
80 | 94 | { |
81 | 95 | static gboolean syslog_initialized = FALSE; |
82 | GError *error = NULL; | |
83 | 96 | |
84 | 97 | if (!syslog_initialized) { |
85 | 98 | openlog ("realmd", 0, LOG_AUTH); |
88 | 101 | |
89 | 102 | log_syslog_and_debug (log_level, string, strlen (string)); |
90 | 103 | |
91 | if (!the_connection || !invocation) { | |
92 | g_free (string); | |
93 | return; | |
94 | } | |
95 | ||
96 | g_dbus_connection_emit_signal (the_connection, g_dbus_method_invocation_get_sender (invocation), | |
97 | g_dbus_method_invocation_get_object_path (invocation), | |
98 | REALM_DBUS_DIAGNOSTICS_INTERFACE, REALM_DBUS_DIAGNOSTICS_SIGNAL, | |
99 | g_variant_new ("(s)", string), &error); | |
100 | ||
101 | if (error != NULL) | |
102 | g_warning ("couldn't emit the Diagnostics signal: %s", error->message); | |
103 | ||
104 | realm_diagnostics_signal (invocation, string); | |
104 | 105 | g_free (string); |
105 | 106 | } |
106 | 107 | |
179 | 180 | |
180 | 181 | log_take_diagnostic (invocation, LOG_INFO, info); |
181 | 182 | } |
183 | ||
184 | void | |
185 | realm_diagnostics_signal (GDBusMethodInvocation *invocation, | |
186 | const gchar *data) | |
187 | { | |
188 | const gchar *operation_id; | |
189 | GError *error = NULL; | |
190 | ||
191 | if (!the_connection || !invocation) | |
192 | return; | |
193 | ||
194 | operation_id = g_object_get_qdata (G_OBJECT (invocation), operation_id_quark); | |
195 | if (operation_id == NULL) { | |
196 | g_warning ("method invocation not marked with operation_id"); | |
197 | operation_id = ""; | |
198 | } | |
199 | ||
200 | g_dbus_connection_emit_signal (the_connection, g_dbus_method_invocation_get_sender (invocation), | |
201 | g_dbus_method_invocation_get_object_path (invocation), | |
202 | REALM_DBUS_DIAGNOSTICS_INTERFACE, REALM_DBUS_DIAGNOSTICS_SIGNAL, | |
203 | g_variant_new ("(ss)", data, operation_id), &error); | |
204 | ||
205 | if (error != NULL) | |
206 | g_warning ("couldn't emit the Diagnostics signal: %s", error->message); | |
207 | } |
22 | 22 | |
23 | 23 | void realm_diagnostics_initialize (GDBusConnection *connection); |
24 | 24 | |
25 | void realm_diagnostics_mark_operation (GDBusMethodInvocation *invocation, | |
26 | const gchar *operation_id); | |
27 | ||
25 | 28 | void realm_diagnostics_info (GDBusMethodInvocation *invocation, |
26 | 29 | const gchar *format, |
27 | 30 | ...) G_GNUC_PRINTF (2, 3); |
35 | 38 | const gchar *format, |
36 | 39 | ...) G_GNUC_PRINTF (3, 4); |
37 | 40 | |
41 | void realm_diagnostics_signal (GDBusMethodInvocation *invocation, | |
42 | const gchar *data); | |
43 | ||
38 | 44 | G_END_DECLS |
39 | 45 | |
40 | 46 | #endif /* __REALM_DIAGNOSTICS_H__ */ |
775 | 775 | |
776 | 776 | g_return_val_if_fail (REALM_IS_INI_CONFIG (self), NULL); |
777 | 777 | g_return_val_if_fail (section != NULL, NULL); |
778 | g_return_val_if_fail (name != NULL, NULL); | |
779 | 778 | |
780 | 779 | sect = g_hash_table_lookup (self->sections, section); |
781 | 780 | if (sect == NULL) |
225 | 225 | handle_enroll_with_credential_cache (RealmDbusKerberos *realm, |
226 | 226 | GDBusMethodInvocation *invocation, |
227 | 227 | GVariant *admin_cache, |
228 | GVariant *options) | |
228 | GVariant *options, | |
229 | const gchar *operation_id) | |
229 | 230 | { |
230 | 231 | RealmKerberos *self = REALM_KERBEROS (realm); |
231 | 232 | GBytes *admin_kerberos_cache; |
233 | 234 | const guchar *data; |
234 | 235 | gsize length; |
235 | 236 | |
237 | /* Make note of the current operation id, for diagnostics */ | |
238 | realm_diagnostics_mark_operation (invocation, operation_id); | |
239 | ||
236 | 240 | data = g_variant_get_fixed_array (admin_cache, &length, 1); |
237 | 241 | if (length == 0) { |
238 | 242 | g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, |
266 | 270 | GDBusMethodInvocation *invocation, |
267 | 271 | const gchar *principal, |
268 | 272 | const gchar *password, |
269 | GVariant *options) | |
273 | GVariant *options, | |
274 | const gchar *operation_id) | |
270 | 275 | { |
271 | 276 | RealmKerberos *self = REALM_KERBEROS (realm); |
272 | 277 | GBytes *admin_kerberos_cache; |
273 | 278 | RealmKerberosClass *klass; |
279 | ||
280 | /* Make note of the current operation id, for diagnostics */ | |
281 | realm_diagnostics_mark_operation (invocation, operation_id); | |
274 | 282 | |
275 | 283 | admin_kerberos_cache = kinit_to_kerberos_cache (invocation, principal, password); |
276 | 284 | if (admin_kerberos_cache == NULL) { |
334 | 342 | handle_unenroll_with_credential_cache (RealmDbusKerberos *realm, |
335 | 343 | GDBusMethodInvocation *invocation, |
336 | 344 | GVariant *admin_cache, |
337 | GVariant *options) | |
345 | GVariant *options, | |
346 | const gchar *operation_id) | |
338 | 347 | { |
339 | 348 | RealmKerberos *self = REALM_KERBEROS (realm); |
340 | 349 | RealmKerberosClass *klass; |
342 | 351 | const guchar *data; |
343 | 352 | gsize length; |
344 | 353 | |
354 | /* Make note of the current operation id, for diagnostics */ | |
355 | realm_diagnostics_mark_operation (invocation, operation_id); | |
356 | ||
345 | 357 | data = g_variant_get_fixed_array (admin_cache, &length, 1); |
346 | 358 | if (length == 0) { |
347 | 359 | g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, |
375 | 387 | GDBusMethodInvocation *invocation, |
376 | 388 | const gchar *principal, |
377 | 389 | const gchar *password, |
378 | GVariant *options) | |
390 | GVariant *options, | |
391 | const gchar *operation_id) | |
379 | 392 | { |
380 | 393 | RealmKerberos *self = REALM_KERBEROS (realm); |
381 | 394 | RealmKerberosClass *klass; |
382 | 395 | GBytes *admin_kerberos_cache; |
396 | ||
397 | /* Make note of the current operation id, for diagnostics */ | |
398 | realm_diagnostics_mark_operation (invocation, operation_id); | |
383 | 399 | |
384 | 400 | admin_kerberos_cache = kinit_to_kerberos_cache (invocation, principal, password); |
385 | 401 | if (admin_kerberos_cache == NULL) { |
410 | 426 | handle_change_permitted_logins (RealmDbusKerberos *realm, |
411 | 427 | GDBusMethodInvocation *invocation, |
412 | 428 | const gchar *const *add, |
413 | const gchar *const *remove) | |
429 | const gchar *const *remove, | |
430 | const gchar *operation_id) | |
414 | 431 | { |
415 | 432 | RealmKerberos *self = REALM_KERBEROS (realm); |
416 | 433 | RealmKerberosClass *klass; |
417 | 434 | GError *error = NULL; |
418 | 435 | gboolean ret; |
436 | ||
437 | /* Make note of the current operation id, for diagnostics */ | |
438 | realm_diagnostics_mark_operation (invocation, operation_id); | |
419 | 439 | |
420 | 440 | if (!realm_daemon_lock_for_action (invocation)) { |
421 | 441 | g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_BUSY, |
459 | 479 | const gchar *interface = g_dbus_method_invocation_get_interface_name (invocation); |
460 | 480 | const gchar *method = g_dbus_method_invocation_get_method_name (invocation); |
461 | 481 | const gchar *action_id = NULL; |
462 | gboolean ret; | |
482 | gboolean ret = FALSE; | |
463 | 483 | |
464 | 484 | /* Each method has its own polkit authorization */ |
465 | 485 | if (g_str_equal (interface, REALM_DBUS_KERBEROS_REALM_INTERFACE)) { |
75 | 75 | |
76 | 76 | relevance = (klass->discover_finish) (closure->self, result, &realms, &error); |
77 | 77 | if (error == NULL) { |
78 | if (relevance > 0) | |
79 | realm_diagnostics_info (closure->invocation, "Successfully discovered realm(s)"); | |
80 | 78 | if (realms == NULL) { |
81 | 79 | realms = g_variant_new_array (G_VARIANT_TYPE ("(sos)"), NULL, 0); |
82 | 80 | g_variant_ref_sink (realms); |
102 | 100 | static gboolean |
103 | 101 | realm_provider_handle_discover (RealmDbusProvider *provider, |
104 | 102 | GDBusMethodInvocation *invocation, |
105 | const gchar *string) | |
103 | const gchar *string, | |
104 | const gchar *operation_id) | |
106 | 105 | { |
107 | 106 | RealmProvider *self = REALM_PROVIDER (provider); |
108 | 107 | RealmProviderClass *klass; |
108 | ||
109 | /* Make note of the current operation id, for diagnostics */ | |
110 | realm_diagnostics_mark_operation (invocation, operation_id); | |
109 | 111 | |
110 | 112 | klass = REALM_PROVIDER_GET_CLASS (self); |
111 | 113 | g_return_val_if_fail (klass->discover_async != NULL, FALSE); |
124 | 126 | const gchar *interface = g_dbus_method_invocation_get_interface_name (invocation); |
125 | 127 | const gchar *method = g_dbus_method_invocation_get_method_name (invocation); |
126 | 128 | const gchar *action_id = NULL; |
127 | gboolean ret; | |
129 | gboolean ret = FALSE; | |
128 | 130 | |
129 | 131 | /* Each method has its own polkit authorization */ |
130 | 132 | if (g_str_equal (interface, REALM_DBUS_PROVIDER_INTERFACE)) { |
160 | 162 | RealmProviderPrivate); |
161 | 163 | self->pv->realms = g_hash_table_new_full (g_str_hash, g_str_equal, |
162 | 164 | g_free, g_object_unref); |
165 | ||
166 | /* The dbus version property of the provider */ | |
167 | g_object_set (self, "version", VERSION, NULL); | |
163 | 168 | } |
164 | 169 | |
165 | 170 | static void |
161 | 161 | /* Use our custom smb.conf */ |
162 | 162 | g_ptr_array_add (args, (gpointer)realm_settings_path ("net")); |
163 | 163 | g_ptr_array_add (args, "-s"); |
164 | g_ptr_array_add (args, SERVICE_DIR "/net-ads-smb.conf"); | |
164 | g_ptr_array_add (args, PRIVATE_DIR "/net-ads-smb.conf"); | |
165 | 165 | |
166 | 166 | va_start (va, user_data); |
167 | 167 | do { |
54 | 54 | realm_samba_provider_init (RealmSambaProvider *self) |
55 | 55 | { |
56 | 56 | self->config = realm_samba_config_new (NULL); |
57 | ||
58 | /* The dbus Name property of the provider */ | |
59 | g_object_set (self, "name", "Samba", NULL); | |
57 | 60 | } |
58 | 61 | |
59 | 62 | static void |
55 | 55 | static void |
56 | 56 | realm_samba_init (RealmSamba *self) |
57 | 57 | { |
58 | g_object_set (self, "suggested-administrator", "Administrator", NULL); | |
58 | GPtrArray *entries; | |
59 | GVariant *entry; | |
60 | GVariant *details; | |
61 | ||
62 | entries = g_ptr_array_new (); | |
63 | ||
64 | entry = g_variant_new_dict_entry (g_variant_new_string ("server-software"), | |
65 | g_variant_new_string ("active-directory")); | |
66 | g_ptr_array_add (entries, entry); | |
67 | ||
68 | entry = g_variant_new_dict_entry (g_variant_new_string ("client-software"), | |
69 | g_variant_new_string ("samba-winbind")); | |
70 | g_ptr_array_add (entries, entry); | |
71 | ||
72 | details = g_variant_new_array (G_VARIANT_TYPE ("{ss}"), | |
73 | (GVariant * const *)entries->pdata, | |
74 | entries->len); | |
75 | g_variant_ref_sink (details); | |
76 | ||
77 | g_object_set (self, | |
78 | "details", details, | |
79 | "suggested-administrator", "Administrator", | |
80 | NULL); | |
81 | ||
82 | g_variant_unref (details); | |
83 | g_ptr_array_free (entries, TRUE); | |
59 | 84 | } |
60 | 85 | |
61 | 86 | static gchar * |
83 | 83 | void |
84 | 84 | realm_settings_init (void) |
85 | 85 | { |
86 | const gchar *default_conf = SERVICE_DIR "/realmd-defaults.conf"; | |
87 | const gchar *distro_conf = SERVICE_DIR "/realmd-distro.conf"; | |
86 | const gchar *default_conf = PRIVATE_DIR "/realmd-defaults.conf"; | |
87 | const gchar *distro_conf = PRIVATE_DIR "/realmd-distro.conf"; | |
88 | 88 | const gchar *admin_conf = SYSCONF_DIR "/realmd.conf"; |
89 | 89 | GError *error = NULL; |
90 | 90 |
3 | 3 | -I$(top_srcdir) \ |
4 | 4 | -DTESTFILE_DIR="\"@abs_srcdir@/files\"" \ |
5 | 5 | -DSYSCONF_DIR="\"/tmp/realmd-etc\"" \ |
6 | -DSERVICE_DIR="\"@abs_srcdir@/files\"" \ | |
6 | -DPRIVATE_DIR="\"@abs_srcdir@/files\"" \ | |
7 | 7 | $(NULL) |
8 | 8 | |
9 | 9 | AM_CFLAGS = \ |
109 | 109 | CYGPATH_W = @CYGPATH_W@ |
110 | 110 | DATADIRNAME = @DATADIRNAME@ |
111 | 111 | DBUS_POLICY_DIR = @DBUS_POLICY_DIR@ |
112 | DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ | |
112 | 113 | DEFS = @DEFS@ |
113 | 114 | DEPDIR = @DEPDIR@ |
114 | 115 | DISTRO = @DISTRO@ |
178 | 179 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
179 | 180 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
180 | 181 | RANLIB = @RANLIB@ |
181 | SERVICE_DIR = @SERVICE_DIR@ | |
182 | 182 | SET_MAKE = @SET_MAKE@ |
183 | 183 | SHELL = @SHELL@ |
184 | 184 | STRIP = @STRIP@ |
220 | 220 | oldincludedir = @oldincludedir@ |
221 | 221 | pdfdir = @pdfdir@ |
222 | 222 | prefix = @prefix@ |
223 | privatedir = @privatedir@ | |
223 | 224 | program_transform_name = @program_transform_name@ |
224 | 225 | psdir = @psdir@ |
225 | 226 | sbindir = @sbindir@ |
232 | 233 | top_srcdir = @top_srcdir@ |
233 | 234 | NULL = |
234 | 235 | TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions |
236 | V_SED = $(V_SED_$(V)) | |
237 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
238 | V_SED_0 = @echo " SED " $@; | |
239 | SED_SUBST = sed \ | |
240 | -e 's,[@]datadir[@],$(datadir),g' \ | |
241 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
242 | -e 's,[@]libdir[@],$(libdir),g' \ | |
243 | -e 's,[@]includedir[@],$(includedir),g' \ | |
244 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
245 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
246 | -e 's,[@]bindir[@],$(bindir),g' \ | |
247 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
248 | -e 's,[@]prefix[@],$(prefix),g' \ | |
249 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
250 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
251 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
252 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
253 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
254 | $(NULL) | |
255 | ||
256 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
235 | 257 | INCLUDES = \ |
236 | 258 | -I$(top_srcdir) \ |
237 | 259 | -DTESTFILE_DIR="\"@abs_srcdir@/files\"" \ |
238 | 260 | -DSYSCONF_DIR="\"/tmp/realmd-etc\"" \ |
239 | -DSERVICE_DIR="\"@abs_srcdir@/files\"" \ | |
261 | -DPRIVATE_DIR="\"@abs_srcdir@/files\"" \ | |
240 | 262 | $(NULL) |
241 | 263 | |
242 | 264 | AM_CFLAGS = \ |
284 | 306 | all: all-am |
285 | 307 | |
286 | 308 | .SUFFIXES: |
287 | .SUFFIXES: .c .o .obj | |
309 | .SUFFIXES: .conf .conf.in .desktop.in .desktop.in.in .service .service.in .c .o .obj | |
288 | 310 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps) |
289 | 311 | @for dep in $?; do \ |
290 | 312 | case '$(am__configure_deps)' in \ |
637 | 659 | @WITH_COVERAGE_TRUE@clear-coverage: |
638 | 660 | @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters |
639 | 661 | |
662 | .desktop.in.in.desktop.in: | |
663 | $(V_SED) $(SED_SUBST) $< > $@ | |
664 | ||
665 | @INTLTOOL_DESKTOP_RULE@ | |
666 | ||
667 | .service.in.service: | |
668 | $(V_SED) $(SED_SUBST) $< > $@ | |
669 | ||
670 | .conf.in.conf: | |
671 | $(V_SED) $(SED_SUBST) $< > $@ | |
672 | ||
640 | 673 | test-c: $(TEST_PROGS) |
641 | 674 | @gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS) |
642 | 675 |
0 | 0 | include $(top_srcdir)/Makefile.decl |
1 | 1 | |
2 | 2 | bin_PROGRAMS = \ |
3 | realm-discover \ | |
3 | 4 | realm-enroll |
4 | 5 | |
5 | 6 | realm_enroll_SOURCES = \ |
6 | 7 | realm-enroll.c \ |
7 | 8 | $(NULL) |
8 | 9 | |
9 | realm_enroll_CFLAGS = \ | |
10 | AM_CFLAGS = \ | |
10 | 11 | -I$(top_srcdir)/dbus \ |
11 | 12 | -I$(top_builddir)/dbus \ |
12 | 13 | $(GLIB_CFLAGS) \ |
13 | 14 | $(KRB5_CFLAGS) \ |
14 | 15 | $(NULL) |
15 | 16 | |
16 | realm_enroll_LDADD = \ | |
17 | LDADD = \ | |
17 | 18 | $(top_builddir)/dbus/librealm-dbus.a \ |
18 | 19 | $(GLIB_LIBS) \ |
19 | 20 | $(KRB5_LIBS) \ |
33 | 33 | POST_UNINSTALL = : |
34 | 34 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ |
35 | 35 | $(top_srcdir)/Makefile.decl |
36 | bin_PROGRAMS = realm-enroll$(EXEEXT) | |
36 | bin_PROGRAMS = realm-discover$(EXEEXT) realm-enroll$(EXEEXT) | |
37 | 37 | subdir = tools |
38 | 38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
39 | 39 | am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \ |
46 | 46 | CONFIG_CLEAN_VPATH_FILES = |
47 | 47 | am__installdirs = "$(DESTDIR)$(bindir)" |
48 | 48 | PROGRAMS = $(bin_PROGRAMS) |
49 | realm_discover_SOURCES = realm-discover.c | |
50 | realm_discover_OBJECTS = realm-discover.$(OBJEXT) | |
51 | realm_discover_LDADD = $(LDADD) | |
52 | am__DEPENDENCIES_1 = | |
53 | realm_discover_DEPENDENCIES = $(top_builddir)/dbus/librealm-dbus.a \ | |
54 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ | |
55 | $(am__DEPENDENCIES_1) | |
49 | 56 | am__objects_1 = |
50 | am_realm_enroll_OBJECTS = realm_enroll-realm-enroll.$(OBJEXT) \ | |
51 | $(am__objects_1) | |
57 | am_realm_enroll_OBJECTS = realm-enroll.$(OBJEXT) $(am__objects_1) | |
52 | 58 | realm_enroll_OBJECTS = $(am_realm_enroll_OBJECTS) |
53 | am__DEPENDENCIES_1 = | |
59 | realm_enroll_LDADD = $(LDADD) | |
54 | 60 | realm_enroll_DEPENDENCIES = $(top_builddir)/dbus/librealm-dbus.a \ |
55 | 61 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
56 | 62 | $(am__DEPENDENCIES_1) |
57 | realm_enroll_LINK = $(CCLD) $(realm_enroll_CFLAGS) $(CFLAGS) \ | |
58 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | |
59 | 63 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
60 | 64 | depcomp = $(SHELL) $(top_srcdir)/depcomp |
61 | 65 | am__depfiles_maybe = depfiles |
62 | 66 | am__mv = mv -f |
63 | AM_V_lt = $(am__v_lt_@AM_V@) | |
64 | am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) | |
65 | am__v_lt_0 = --silent | |
66 | 67 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
67 | 68 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
68 | 69 | AM_V_CC = $(am__v_CC_@AM_V@) |
79 | 80 | AM_V_GEN = $(am__v_GEN_@AM_V@) |
80 | 81 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) |
81 | 82 | am__v_GEN_0 = @echo " GEN " $@; |
82 | SOURCES = $(realm_enroll_SOURCES) | |
83 | DIST_SOURCES = $(realm_enroll_SOURCES) | |
83 | SOURCES = realm-discover.c $(realm_enroll_SOURCES) | |
84 | DIST_SOURCES = realm-discover.c $(realm_enroll_SOURCES) | |
84 | 85 | ETAGS = etags |
85 | 86 | CTAGS = ctags |
86 | 87 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
102 | 103 | CYGPATH_W = @CYGPATH_W@ |
103 | 104 | DATADIRNAME = @DATADIRNAME@ |
104 | 105 | DBUS_POLICY_DIR = @DBUS_POLICY_DIR@ |
106 | DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ | |
105 | 107 | DEFS = @DEFS@ |
106 | 108 | DEPDIR = @DEPDIR@ |
107 | 109 | DISTRO = @DISTRO@ |
171 | 173 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
172 | 174 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
173 | 175 | RANLIB = @RANLIB@ |
174 | SERVICE_DIR = @SERVICE_DIR@ | |
175 | 176 | SET_MAKE = @SET_MAKE@ |
176 | 177 | SHELL = @SHELL@ |
177 | 178 | STRIP = @STRIP@ |
213 | 214 | oldincludedir = @oldincludedir@ |
214 | 215 | pdfdir = @pdfdir@ |
215 | 216 | prefix = @prefix@ |
217 | privatedir = @privatedir@ | |
216 | 218 | program_transform_name = @program_transform_name@ |
217 | 219 | psdir = @psdir@ |
218 | 220 | sbindir = @sbindir@ |
225 | 227 | top_srcdir = @top_srcdir@ |
226 | 228 | NULL = |
227 | 229 | TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions |
230 | V_SED = $(V_SED_$(V)) | |
231 | V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY)) | |
232 | V_SED_0 = @echo " SED " $@; | |
233 | SED_SUBST = sed \ | |
234 | -e 's,[@]datadir[@],$(datadir),g' \ | |
235 | -e 's,[@]libexecdir[@],$(libexecdir),g' \ | |
236 | -e 's,[@]libdir[@],$(libdir),g' \ | |
237 | -e 's,[@]includedir[@],$(includedir),g' \ | |
238 | -e 's,[@]datarootdir[@],$(datarootdir),g' \ | |
239 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
240 | -e 's,[@]bindir[@],$(bindir),g' \ | |
241 | -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ | |
242 | -e 's,[@]prefix[@],$(prefix),g' \ | |
243 | -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \ | |
244 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
245 | -e 's,[@]privatedir[@],$(privatedir),g' \ | |
246 | -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ | |
247 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
248 | $(NULL) | |
249 | ||
250 | SUFFIXES = .conf .conf.in .desktop.in .desktop.in.in .service .service.in | |
228 | 251 | realm_enroll_SOURCES = \ |
229 | 252 | realm-enroll.c \ |
230 | 253 | $(NULL) |
231 | 254 | |
232 | realm_enroll_CFLAGS = \ | |
255 | AM_CFLAGS = \ | |
233 | 256 | -I$(top_srcdir)/dbus \ |
234 | 257 | -I$(top_builddir)/dbus \ |
235 | 258 | $(GLIB_CFLAGS) \ |
236 | 259 | $(KRB5_CFLAGS) \ |
237 | 260 | $(NULL) |
238 | 261 | |
239 | realm_enroll_LDADD = \ | |
262 | LDADD = \ | |
240 | 263 | $(top_builddir)/dbus/librealm-dbus.a \ |
241 | 264 | $(GLIB_LIBS) \ |
242 | 265 | $(KRB5_LIBS) \ |
245 | 268 | all: all-am |
246 | 269 | |
247 | 270 | .SUFFIXES: |
248 | .SUFFIXES: .c .o .obj | |
271 | .SUFFIXES: .conf .conf.in .desktop.in .desktop.in.in .service .service.in .c .o .obj | |
249 | 272 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps) |
250 | 273 | @for dep in $?; do \ |
251 | 274 | case '$(am__configure_deps)' in \ |
314 | 337 | |
315 | 338 | clean-binPROGRAMS: |
316 | 339 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) |
340 | realm-discover$(EXEEXT): $(realm_discover_OBJECTS) $(realm_discover_DEPENDENCIES) $(EXTRA_realm_discover_DEPENDENCIES) | |
341 | @rm -f realm-discover$(EXEEXT) | |
342 | $(AM_V_CCLD)$(LINK) $(realm_discover_OBJECTS) $(realm_discover_LDADD) $(LIBS) | |
317 | 343 | realm-enroll$(EXEEXT): $(realm_enroll_OBJECTS) $(realm_enroll_DEPENDENCIES) $(EXTRA_realm_enroll_DEPENDENCIES) |
318 | 344 | @rm -f realm-enroll$(EXEEXT) |
319 | $(AM_V_CCLD)$(realm_enroll_LINK) $(realm_enroll_OBJECTS) $(realm_enroll_LDADD) $(LIBS) | |
345 | $(AM_V_CCLD)$(LINK) $(realm_enroll_OBJECTS) $(realm_enroll_LDADD) $(LIBS) | |
320 | 346 | |
321 | 347 | mostlyclean-compile: |
322 | 348 | -rm -f *.$(OBJEXT) |
324 | 350 | distclean-compile: |
325 | 351 | -rm -f *.tab.c |
326 | 352 | |
327 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm_enroll-realm-enroll.Po@am__quote@ | |
353 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm-discover.Po@am__quote@ | |
354 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm-enroll.Po@am__quote@ | |
328 | 355 | |
329 | 356 | .c.o: |
330 | 357 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
339 | 366 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
340 | 367 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
341 | 368 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` |
342 | ||
343 | realm_enroll-realm-enroll.o: realm-enroll.c | |
344 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -MT realm_enroll-realm-enroll.o -MD -MP -MF $(DEPDIR)/realm_enroll-realm-enroll.Tpo -c -o realm_enroll-realm-enroll.o `test -f 'realm-enroll.c' || echo '$(srcdir)/'`realm-enroll.c | |
345 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm_enroll-realm-enroll.Tpo $(DEPDIR)/realm_enroll-realm-enroll.Po | |
346 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-enroll.c' object='realm_enroll-realm-enroll.o' libtool=no @AMDEPBACKSLASH@ | |
347 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
348 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -c -o realm_enroll-realm-enroll.o `test -f 'realm-enroll.c' || echo '$(srcdir)/'`realm-enroll.c | |
349 | ||
350 | realm_enroll-realm-enroll.obj: realm-enroll.c | |
351 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -MT realm_enroll-realm-enroll.obj -MD -MP -MF $(DEPDIR)/realm_enroll-realm-enroll.Tpo -c -o realm_enroll-realm-enroll.obj `if test -f 'realm-enroll.c'; then $(CYGPATH_W) 'realm-enroll.c'; else $(CYGPATH_W) '$(srcdir)/realm-enroll.c'; fi` | |
352 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm_enroll-realm-enroll.Tpo $(DEPDIR)/realm_enroll-realm-enroll.Po | |
353 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-enroll.c' object='realm_enroll-realm-enroll.obj' libtool=no @AMDEPBACKSLASH@ | |
354 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
355 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -c -o realm_enroll-realm-enroll.obj `if test -f 'realm-enroll.c'; then $(CYGPATH_W) 'realm-enroll.c'; else $(CYGPATH_W) '$(srcdir)/realm-enroll.c'; fi` | |
356 | 369 | |
357 | 370 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
358 | 371 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
579 | 592 | @WITH_COVERAGE_TRUE@clear-coverage: |
580 | 593 | @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters |
581 | 594 | |
595 | .desktop.in.in.desktop.in: | |
596 | $(V_SED) $(SED_SUBST) $< > $@ | |
597 | ||
598 | @INTLTOOL_DESKTOP_RULE@ | |
599 | ||
600 | .service.in.service: | |
601 | $(V_SED) $(SED_SUBST) $< > $@ | |
602 | ||
603 | .conf.in.conf: | |
604 | $(V_SED) $(SED_SUBST) $< > $@ | |
605 | ||
582 | 606 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
583 | 607 | # Otherwise a system limit (for SysV at least) may be exceeded. |
584 | 608 | .NOEXPORT: |
0 | /* realmd -- Realm configuration service | |
1 | * | |
2 | * Copyright 2012 Red Hat Inc | |
3 | * | |
4 | * This program is free software: you can redistribute it and/or modify | |
5 | * it under the terms of the GNU Lesser General Public License as published | |
6 | * by the Free Software Foundation; either version 2 of the licence or (at | |
7 | * your option) any later version. | |
8 | * | |
9 | * See the included COPYING file for more information. | |
10 | * | |
11 | * Author: Stef Walter <stefw@gnome.org> | |
12 | */ | |
13 | ||
14 | #include "config.h" | |
15 | ||
16 | #include "realm-dbus-constants.h" | |
17 | #include "realm-dbus-generated.h" | |
18 | ||
19 | #include <krb5/krb5.h> | |
20 | ||
21 | #include <glib.h> | |
22 | #include <glib/gstdio.h> | |
23 | ||
24 | #include <sys/types.h> | |
25 | #include <sys/stat.h> | |
26 | #include <errno.h> | |
27 | #include <fcntl.h> | |
28 | ||
29 | static void | |
30 | handle_error (GError *error, | |
31 | const gchar *format, | |
32 | ...) | |
33 | { | |
34 | GString *message; | |
35 | va_list va; | |
36 | ||
37 | message = g_string_new (""); | |
38 | g_string_append_printf (message, "%s: ", g_get_prgname ()); | |
39 | ||
40 | va_start (va, format); | |
41 | g_string_append_vprintf (message, format, va); | |
42 | va_end (va); | |
43 | ||
44 | if (error) { | |
45 | g_string_append (message, ": "); | |
46 | g_string_append (message, error->message); | |
47 | g_error_free (error); | |
48 | } | |
49 | ||
50 | g_printerr ("%s\n", message->str); | |
51 | g_string_free (message, TRUE); | |
52 | } | |
53 | ||
54 | static void | |
55 | print_details_for_realm_info (GVariant *realm_info) | |
56 | { | |
57 | RealmDbusKerberos *realm = NULL; | |
58 | const gchar *bus_name; | |
59 | const gchar *object_path; | |
60 | const gchar *interface_name; | |
61 | GError *error = NULL; | |
62 | GVariantIter iter; | |
63 | GVariant *details; | |
64 | const gchar *name; | |
65 | const gchar *value; | |
66 | ||
67 | g_variant_get (realm_info, "(&s&o&s)", &bus_name, &object_path, &interface_name); | |
68 | ||
69 | if (!g_str_equal (interface_name, REALM_DBUS_KERBEROS_REALM_INTERFACE)) | |
70 | return; | |
71 | ||
72 | realm = realm_dbus_kerberos_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, | |
73 | G_DBUS_PROXY_FLAGS_NONE, | |
74 | bus_name, object_path, | |
75 | NULL, &error); | |
76 | ||
77 | if (error != NULL) { | |
78 | g_warning ("couldn't use realm service: %s", error->message); | |
79 | g_error_free (error); | |
80 | return; | |
81 | } | |
82 | ||
83 | g_print ("%s\n", realm_dbus_kerberos_get_name (realm)); | |
84 | g_print ("domain: %s\n", realm_dbus_kerberos_get_domain (realm)); | |
85 | ||
86 | details = realm_dbus_kerberos_get_details (realm); | |
87 | if (details) { | |
88 | g_variant_iter_init (&iter, details); | |
89 | while (g_variant_iter_loop (&iter, "{&s&s}", &name, &value)) | |
90 | g_print ("%s: %s\n", name, value); | |
91 | } | |
92 | ||
93 | g_object_unref (realm); | |
94 | } | |
95 | ||
96 | static void | |
97 | on_diagnostics_signal (GDBusConnection *connection, | |
98 | const gchar *sender_name, | |
99 | const gchar *object_path, | |
100 | const gchar *interface_name, | |
101 | const gchar *signal_name, | |
102 | GVariant *parameters, | |
103 | gpointer user_data) | |
104 | { | |
105 | const gchar *data; | |
106 | const gchar *unused; | |
107 | g_variant_get (parameters, "(&s&s)", &data, &unused); | |
108 | g_printerr ("%s", data); | |
109 | } | |
110 | ||
111 | static void | |
112 | connect_to_diagnostics (GDBusProxy *proxy) | |
113 | { | |
114 | GDBusConnection *connection; | |
115 | const gchar *bus_name; | |
116 | const gchar *object_path; | |
117 | ||
118 | connection = g_dbus_proxy_get_connection (proxy); | |
119 | bus_name = g_dbus_proxy_get_name (proxy); | |
120 | object_path = g_dbus_proxy_get_object_path (proxy); | |
121 | ||
122 | g_dbus_connection_signal_subscribe (connection, bus_name, | |
123 | REALM_DBUS_DIAGNOSTICS_INTERFACE, | |
124 | REALM_DBUS_DIAGNOSTICS_SIGNAL, | |
125 | object_path, NULL, G_DBUS_SIGNAL_FLAGS_NONE, | |
126 | on_diagnostics_signal, NULL, NULL); | |
127 | } | |
128 | ||
129 | typedef struct { | |
130 | GAsyncResult *result; | |
131 | GMainLoop *loop; | |
132 | } SyncClosure; | |
133 | ||
134 | static void | |
135 | on_complete_get_result (GObject *source, | |
136 | GAsyncResult *result, | |
137 | gpointer user_data) | |
138 | { | |
139 | SyncClosure *sync = user_data; | |
140 | sync->result = g_object_ref (result); | |
141 | g_main_loop_quit (sync->loop); | |
142 | } | |
143 | ||
144 | static int | |
145 | realm_discover (const gchar *string, | |
146 | gboolean verbose) | |
147 | { | |
148 | RealmDbusProvider *provider; | |
149 | GVariant *realm_info; | |
150 | gboolean found = FALSE; | |
151 | GError *error = NULL; | |
152 | GVariantIter iter; | |
153 | SyncClosure sync; | |
154 | GVariant *realms; | |
155 | gint relevance; | |
156 | ||
157 | provider = realm_dbus_provider_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, | |
158 | G_DBUS_PROXY_FLAGS_NONE, | |
159 | REALM_DBUS_ALL_PROVIDER_NAME, | |
160 | REALM_DBUS_ALL_PROVIDER_PATH, | |
161 | NULL, &error); | |
162 | if (error != NULL) { | |
163 | handle_error (error, "couldn't connect to realm service"); | |
164 | return 2; | |
165 | } | |
166 | ||
167 | /* Setup diagnostics */ | |
168 | if (verbose) | |
169 | connect_to_diagnostics (G_DBUS_PROXY (provider)); | |
170 | ||
171 | sync.result = NULL; | |
172 | sync.loop = g_main_loop_new (NULL, FALSE); | |
173 | ||
174 | g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (provider), G_MAXINT); | |
175 | realm_dbus_provider_call_discover (provider, string, "unused-operation-id", | |
176 | NULL, on_complete_get_result, &sync); | |
177 | ||
178 | /* This mainloop is quit by on_complete_get_result */ | |
179 | g_main_loop_run (sync.loop); | |
180 | ||
181 | realm_dbus_provider_call_discover_finish (provider, &relevance, &realms, | |
182 | sync.result, &error); | |
183 | ||
184 | g_object_unref (sync.result); | |
185 | g_main_loop_unref (sync.loop); | |
186 | ||
187 | if (error != NULL) { | |
188 | handle_error (error, "couldn't discover realm"); | |
189 | return 2; | |
190 | } | |
191 | ||
192 | g_variant_iter_init (&iter, realms); | |
193 | while ((realm_info = g_variant_iter_next_value (&iter)) != NULL) { | |
194 | print_details_for_realm_info (realm_info); | |
195 | g_variant_unref (realm_info); | |
196 | found = TRUE; | |
197 | } | |
198 | ||
199 | g_variant_unref (realms); | |
200 | ||
201 | if (!found) { | |
202 | handle_error (NULL, "no such realm found: %s", string); | |
203 | return 1; | |
204 | } | |
205 | ||
206 | return 0; | |
207 | } | |
208 | ||
209 | int | |
210 | main (int argc, | |
211 | char *argv[]) | |
212 | { | |
213 | GOptionContext *context; | |
214 | gboolean arg_verbose = FALSE; | |
215 | GError *error = NULL; | |
216 | gint result = 0; | |
217 | gint ret; | |
218 | gint i; | |
219 | ||
220 | GOptionEntry option_entries[] = { | |
221 | { "verbose", 'v', 0, G_OPTION_ARG_NONE, &arg_verbose, "Verbose output", NULL }, | |
222 | { NULL, } | |
223 | }; | |
224 | ||
225 | g_type_init (); | |
226 | ||
227 | context = g_option_context_new ("realm-or-domain"); | |
228 | g_option_context_add_main_entries (context, option_entries, NULL); | |
229 | ||
230 | if (!g_option_context_parse (context, &argc, &argv, &error)) { | |
231 | g_printerr ("%s: %s\n", g_get_prgname (), error->message); | |
232 | g_error_free (error); | |
233 | ret = 2; | |
234 | } | |
235 | ||
236 | /* The default realm? */ | |
237 | if (argc == 1) { | |
238 | ret = realm_discover ("", arg_verbose); | |
239 | ||
240 | /* Specific realms */ | |
241 | } else { | |
242 | for (i = 1; i < argc; i++) { | |
243 | ret = realm_discover (argv[i], arg_verbose); | |
244 | if (ret != 0) | |
245 | result = ret; | |
246 | } | |
247 | } | |
248 | ||
249 | g_option_context_free (context); | |
250 | return result; | |
251 | } |
26 | 26 | #include <errno.h> |
27 | 27 | #include <fcntl.h> |
28 | 28 | |
29 | /* Only one operation at a time per process, so fine to do this */ | |
30 | static const gchar *operation_id = "realm-enroll"; | |
31 | ||
29 | 32 | static void |
30 | 33 | handle_error (GError *error, |
31 | 34 | const gchar *format, |
141 | 144 | } |
142 | 145 | |
143 | 146 | g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (provider), G_MAXINT); |
144 | realm_dbus_provider_call_discover_sync (provider, string, &relevance, | |
145 | &realms, NULL, &error); | |
147 | realm_dbus_provider_call_discover_sync (provider, string, operation_id, | |
148 | &relevance, &realms, NULL, &error); | |
146 | 149 | |
147 | 150 | g_object_unref (provider); |
148 | 151 | |
271 | 274 | GVariant *parameters, |
272 | 275 | gpointer user_data) |
273 | 276 | { |
277 | const gchar *operation_id; | |
274 | 278 | const gchar *data; |
275 | g_variant_get (parameters, "(&s)", &data); | |
279 | ||
280 | g_variant_get (parameters, "(&s&s)", &data, &operation_id); | |
276 | 281 | g_printerr ("%s", data); |
277 | 282 | } |
278 | 283 | |
323 | 328 | SyncClosure sync; |
324 | 329 | gchar *principal; |
325 | 330 | |
326 | if (user_name == NULL) | |
327 | user_name = g_get_user_name (); | |
328 | ||
329 | 331 | /* Discover the realm */ |
330 | 332 | realm = discover_realm_for_string (string); |
331 | 333 | if (realm == NULL) |
332 | 334 | return 1; |
335 | ||
336 | if (user_name == NULL) | |
337 | user_name = realm_dbus_kerberos_get_suggested_administrator (realm); | |
338 | if (user_name == NULL) | |
339 | user_name = g_get_user_name (); | |
333 | 340 | |
334 | 341 | /* Do a kinit for the given realm */ |
335 | 342 | realm_name = realm_dbus_kerberos_get_name (realm); |
355 | 362 | g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (realm), G_MAXINT); |
356 | 363 | if (join) |
357 | 364 | realm_dbus_kerberos_call_enroll_with_credential_cache (realm, kerberos_cache, options, |
358 | NULL, on_complete_get_result, | |
359 | &sync); | |
365 | operation_id, NULL, | |
366 | on_complete_get_result, &sync); | |
360 | 367 | else |
361 | 368 | realm_dbus_kerberos_call_unenroll_with_credential_cache (realm, kerberos_cache, options, |
362 | NULL, on_complete_get_result, | |
363 | &sync); | |
369 | operation_id, NULL, | |
370 | on_complete_get_result, &sync); | |
364 | 371 | |
365 | 372 | g_variant_unref (options); |
366 | 373 | g_variant_unref (kerberos_cache); |