diff options
| author | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:20:58 +0200 |
|---|---|---|
| committer | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:20:58 +0200 |
| commit | a4256940da049f91bbbea5e53e469a59ea9c10f7 (patch) | |
| tree | 2211c102aea3a33f34f960f48c8b8a55daccd97b /libnm-util | |
| parent | 8d275584fc94f398f0a7c990dcd057533d9a5856 (diff) | |
Imported Upstream version 0.9.8.8 upstream/0.9.8.8
Diffstat (limited to 'libnm-util')
| -rw-r--r-- | libnm-util/Makefile.in | 332 | ||||
| -rw-r--r-- | libnm-util/crypto.c | 6 | ||||
| -rw-r--r-- | libnm-util/nm-connection.c | 64 | ||||
| -rw-r--r-- | libnm-util/nm-setting-8021x.c | 137 | ||||
| -rw-r--r-- | libnm-util/nm-setting-bluetooth.c | 1 | ||||
| -rw-r--r-- | libnm-util/nm-setting-bond.c | 11 | ||||
| -rw-r--r-- | libnm-util/nm-setting-connection.c | 3 | ||||
| -rw-r--r-- | libnm-util/nm-setting-gsm.c | 28 | ||||
| -rw-r--r-- | libnm-util/nm-setting-ip4-config.c | 27 | ||||
| -rw-r--r-- | libnm-util/nm-setting-ip6-config.c | 36 | ||||
| -rw-r--r-- | libnm-util/nm-setting-pppoe.c | 13 | ||||
| -rw-r--r-- | libnm-util/nm-setting-vlan.c | 6 | ||||
| -rw-r--r-- | libnm-util/nm-setting-wired.c | 7 | ||||
| -rw-r--r-- | libnm-util/nm-setting-wireless-security.c | 46 | ||||
| -rw-r--r-- | libnm-util/nm-setting-wireless.c | 16 | ||||
| -rw-r--r-- | libnm-util/nm-setting.c | 14 | ||||
| -rw-r--r-- | libnm-util/nm-utils.c | 16 | ||||
| -rw-r--r-- | libnm-util/tests/Makefile.in | 293 | ||||
| -rw-r--r-- | libnm-util/tests/certs/Makefile.in | 104 | ||||
| -rw-r--r-- | libnm-util/tests/test-general.c | 24 |
20 files changed, 721 insertions, 463 deletions
diff --git a/libnm-util/Makefile.in b/libnm-util/Makefile.in index 3652377a..7fac11bd 100644 --- a/libnm-util/Makefile.in +++ b/libnm-util/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -68,8 +95,9 @@ host_triplet = @host@ @HAVE_INTROSPECTION_TRUE@am__append_13 = NetworkManager-1.0.gir @HAVE_INTROSPECTION_TRUE@am__append_14 = $(gir_DATA) $(typelib_DATA) subdir = libnm-util -DIST_COMMON = $(libnm_util_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/libnm-util.pc.in COPYING +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/libnm-util.pc.in $(top_srcdir)/build-aux/depcomp \ + $(libnm_util_include_HEADERS) COPYING ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 \ @@ -174,6 +202,7 @@ libnm_util_la_OBJECTS = $(am_libnm_util_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libnm_util_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libnm_util_la_LDFLAGS) $(LDFLAGS) -o $@ @@ -186,6 +215,18 @@ am__libtest_crypto_la_SOURCES_DIST = crypto.c crypto_gnutls.c \ am_libtest_crypto_la_OBJECTS = libtest_crypto_la-crypto.lo \ $(am__objects_5) $(am__objects_6) libtest_crypto_la_OBJECTS = $(am_libtest_crypto_la_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -198,30 +239,27 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnm_util_la_SOURCES) $(libtest_crypto_la_SOURCES) DIST_SOURCES = $(am__libnm_util_la_SOURCES_DIST) \ $(am__libtest_crypto_la_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -231,9 +269,29 @@ DATA = $(gir_DATA) $(pkgconfig_DATA) $(typelib_DATA) HEADERS = $(libnm_util_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -404,7 +462,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -419,6 +476,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ +SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ @@ -651,6 +710,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): libnm-util.pc: $(top_builddir)/config.status $(srcdir)/libnm-util.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -677,23 +737,29 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libnm-util.la: $(libnm_util_la_OBJECTS) $(libnm_util_la_DEPENDENCIES) $(EXTRA_libnm_util_la_DEPENDENCIES) $(AM_V_CCLD)$(libnm_util_la_LINK) -rpath $(libdir) $(libnm_util_la_OBJECTS) $(libnm_util_la_LIBADD) $(LIBS) + libtest-crypto.la: $(libtest_crypto_la_OBJECTS) $(libtest_crypto_la_DEPENDENCIES) $(EXTRA_libtest_crypto_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtest_crypto_la_OBJECTS) $(libtest_crypto_la_LIBADD) $(LIBS) @@ -1080,22 +1146,25 @@ uninstall-libnm_util_includeHEADERS: dir='$(DESTDIR)$(libnm_util_includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1110,57 +1179,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1176,12 +1200,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1193,15 +1212,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1210,6 +1225,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1388,29 +1418,27 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-libnm_util_includeHEADERS uninstall-pkgconfigDATA \ uninstall-typelibDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - check-am ctags-recursive install install-am install-strip \ - tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am check-local clean clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - ctags ctags-recursive distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-girDATA install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-libnm_util_includeHEADERS \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip install-typelibDATA \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-girDATA uninstall-libLTLIBRARIES \ - uninstall-libnm_util_includeHEADERS uninstall-pkgconfigDATA \ - uninstall-typelibDATA +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am check-local clean clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-girDATA install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-libnm_util_includeHEADERS install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip install-typelibDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-girDATA \ + uninstall-libLTLIBRARIES uninstall-libnm_util_includeHEADERS \ + uninstall-pkgconfigDATA uninstall-typelibDATA include $(GLIB_MAKEFILE) diff --git a/libnm-util/crypto.c b/libnm-util/crypto.c index 949ee812..0cad7f60 100644 --- a/libnm-util/crypto.c +++ b/libnm-util/crypto.c @@ -238,19 +238,25 @@ parse_old_openssl_key_file (const GByteArray *contents, _("Could not decode private key.")); goto parse_error; } + g_string_free (str, TRUE); if (lines) g_strfreev (lines); bindata = g_byte_array_sized_new (tmp_len); g_byte_array_append (bindata, tmp, tmp_len); + g_free (tmp); + *out_iv = iv; *out_cipher = cipher; return bindata; parse_error: + g_free (tmp); g_free (cipher); g_free (iv); + if (str) + g_string_free (str, TRUE); if (lines) g_strfreev (lines); return NULL; diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c index 47a9ec09..15b1685f 100644 --- a/libnm-util/nm-connection.c +++ b/libnm-util/nm-connection.c @@ -285,7 +285,7 @@ nm_connection_lookup_setting_type_by_quark (GQuark error_quark) * * Create a new #NMSetting object of the desired type, given a setting name. * - * Returns: (transfer full): the new setting object, or NULL if the setting name was unknown + * Returns: (transfer full): the new setting object, or %NULL if the setting name was unknown **/ NMSetting * nm_connection_create_setting (const char *name) @@ -361,7 +361,7 @@ nm_connection_remove_setting (NMConnection *connection, GType setting_type) * Gets the #NMSetting with the given #GType, if one has been previously added * to the #NMConnection. * - * Returns: (transfer none): the #NMSetting, or NULL if no setting of that type was previously + * Returns: (transfer none): the #NMSetting, or %NULL if no setting of that type was previously * added to the #NMConnection **/ NMSetting * @@ -382,7 +382,7 @@ nm_connection_get_setting (NMConnection *connection, GType setting_type) * Gets the #NMSetting with the given name, if one has been previously added * the the #NMConnection. * - * Returns: (transfer none): the #NMSetting, or NULL if no setting with that name was previously + * Returns: (transfer none): the #NMSetting, or %NULL if no setting with that name was previously * added to the #NMConnection **/ NMSetting * @@ -821,12 +821,12 @@ setting_priority_compare (gconstpointer a, gconstpointer b) /** * nm_connection_need_secrets: * @connection: the #NMConnection - * @hints: (out callee-allocates) (element-type utf8) (allow-none) (transfer full): - * the address of a pointer to a #GPtrArray, initialized to NULL, which on + * @hints: (out) (element-type utf8) (allow-none) (transfer container): + * the address of a pointer to a #GPtrArray, initialized to %NULL, which on * return points to an allocated #GPtrArray containing the property names of * secrets of the #NMSetting which may be required; the caller owns the array - * and must free the each array element with g_free(), as well as the array - * itself with g_ptr_array_free() + * and must free the array itself with g_ptr_array_free(), but not free its + * elements * * Returns the name of the first setting object in the connection which would * need secrets to make a successful connection. The returned hints are only @@ -1112,9 +1112,9 @@ nm_connection_get_path (NMConnection *connection) * Returns the name of the virtual kernel interface which the connection * needs to use if specified in the settings. This function abstracts all * connection types which require this functionality. For all other - * connection types, this function will return NULL. + * connection types, this function will return %NULL. * - * Returns: Name of the kernel interface or NULL + * Returns: Name of the kernel interface or %NULL */ const char * nm_connection_get_virtual_iface_name (NMConnection *connection) @@ -1152,7 +1152,7 @@ nm_connection_new (void) * nm_connection_to_hash() for a description of the expected hash table. * * Returns: the new #NMConnection object, populated with settings created - * from the values in the hash table, or NULL if the connection failed to + * from the values in the hash table, or %NULL if the connection failed to * validate **/ NMConnection * @@ -1257,7 +1257,7 @@ nm_connection_get_id (NMConnection *connection) * * A shortcut to return any #NMSetting8021x the connection might contain. * - * Returns: (transfer none): an #NMSetting8021x if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSetting8021x if the connection contains one, otherwise %NULL **/ NMSetting8021x * nm_connection_get_setting_802_1x (NMConnection *connection) @@ -1274,7 +1274,7 @@ nm_connection_get_setting_802_1x (NMConnection *connection) * * A shortcut to return any #NMSettingBluetooth the connection might contain. * - * Returns: (transfer none): an #NMSettingBluetooth if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingBluetooth if the connection contains one, otherwise %NULL **/ NMSettingBluetooth * nm_connection_get_setting_bluetooth (NMConnection *connection) @@ -1291,7 +1291,7 @@ nm_connection_get_setting_bluetooth (NMConnection *connection) * * A shortcut to return any #NMSettingBond the connection might contain. * - * Returns: (transfer none): an #NMSettingBond if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingBond if the connection contains one, otherwise %NULL **/ NMSettingBond * nm_connection_get_setting_bond (NMConnection *connection) @@ -1308,7 +1308,7 @@ nm_connection_get_setting_bond (NMConnection *connection) * * A shortcut to return any #NMSettingBridge the connection might contain. * - * Returns: (transfer none): an #NMSettingBridge if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingBridge if the connection contains one, otherwise %NULL **/ NMSettingBridge * nm_connection_get_setting_bridge (NMConnection *connection) @@ -1325,7 +1325,7 @@ nm_connection_get_setting_bridge (NMConnection *connection) * * A shortcut to return any #NMSettingCdma the connection might contain. * - * Returns: (transfer none): an #NMSettingCdma if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingCdma if the connection contains one, otherwise %NULL **/ NMSettingCdma * nm_connection_get_setting_cdma (NMConnection *connection) @@ -1342,7 +1342,7 @@ nm_connection_get_setting_cdma (NMConnection *connection) * * A shortcut to return any #NMSettingConnection the connection might contain. * - * Returns: (transfer none): an #NMSettingConnection if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingConnection if the connection contains one, otherwise %NULL **/ NMSettingConnection * nm_connection_get_setting_connection (NMConnection *connection) @@ -1359,7 +1359,7 @@ nm_connection_get_setting_connection (NMConnection *connection) * * A shortcut to return any #NMSettingGsm the connection might contain. * - * Returns: (transfer none): an #NMSettingGsm if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingGsm if the connection contains one, otherwise %NULL **/ NMSettingGsm * nm_connection_get_setting_gsm (NMConnection *connection) @@ -1376,7 +1376,7 @@ nm_connection_get_setting_gsm (NMConnection *connection) * * A shortcut to return any #NMSettingInfiniband the connection might contain. * - * Returns: (transfer none): an #NMSettingInfiniband if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingInfiniband if the connection contains one, otherwise %NULL **/ NMSettingInfiniband * nm_connection_get_setting_infiniband (NMConnection *connection) @@ -1393,7 +1393,7 @@ nm_connection_get_setting_infiniband (NMConnection *connection) * * A shortcut to return any #NMSettingIP4Config the connection might contain. * - * Returns: (transfer none): an #NMSettingIP4Config if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingIP4Config if the connection contains one, otherwise %NULL **/ NMSettingIP4Config * nm_connection_get_setting_ip4_config (NMConnection *connection) @@ -1410,7 +1410,7 @@ nm_connection_get_setting_ip4_config (NMConnection *connection) * * A shortcut to return any #NMSettingIP6Config the connection might contain. * - * Returns: (transfer none): an #NMSettingIP6Config if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingIP6Config if the connection contains one, otherwise %NULL **/ NMSettingIP6Config * nm_connection_get_setting_ip6_config (NMConnection *connection) @@ -1427,7 +1427,7 @@ nm_connection_get_setting_ip6_config (NMConnection *connection) * * A shortcut to return any #NMSettingOlpcMesh the connection might contain. * - * Returns: (transfer none): an #NMSettingOlpcMesh if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingOlpcMesh if the connection contains one, otherwise %NULL **/ NMSettingOlpcMesh * nm_connection_get_setting_olpc_mesh (NMConnection *connection) @@ -1444,7 +1444,7 @@ nm_connection_get_setting_olpc_mesh (NMConnection *connection) * * A shortcut to return any #NMSettingPPP the connection might contain. * - * Returns: (transfer none): an #NMSettingPPP if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingPPP if the connection contains one, otherwise %NULL **/ NMSettingPPP * nm_connection_get_setting_ppp (NMConnection *connection) @@ -1461,7 +1461,7 @@ nm_connection_get_setting_ppp (NMConnection *connection) * * A shortcut to return any #NMSettingPPPOE the connection might contain. * - * Returns: (transfer none): an #NMSettingPPPOE if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingPPPOE if the connection contains one, otherwise %NULL **/ NMSettingPPPOE * nm_connection_get_setting_pppoe (NMConnection *connection) @@ -1478,7 +1478,7 @@ nm_connection_get_setting_pppoe (NMConnection *connection) * * A shortcut to return any #NMSettingSerial the connection might contain. * - * Returns: (transfer none): an #NMSettingSerial if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingSerial if the connection contains one, otherwise %NULL **/ NMSettingSerial * nm_connection_get_setting_serial (NMConnection *connection) @@ -1495,7 +1495,7 @@ nm_connection_get_setting_serial (NMConnection *connection) * * A shortcut to return any #NMSettingVPN the connection might contain. * - * Returns: (transfer none): an #NMSettingVPN if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingVPN if the connection contains one, otherwise %NULL **/ NMSettingVPN * nm_connection_get_setting_vpn (NMConnection *connection) @@ -1512,7 +1512,7 @@ nm_connection_get_setting_vpn (NMConnection *connection) * * A shortcut to return any #NMSettingWimax the connection might contain. * - * Returns: (transfer none): an #NMSettingWimax if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingWimax if the connection contains one, otherwise %NULL **/ NMSettingWimax * nm_connection_get_setting_wimax (NMConnection *connection) @@ -1529,7 +1529,7 @@ nm_connection_get_setting_wimax (NMConnection *connection) * * A shortcut to return any #NMSettingWired the connection might contain. * - * Returns: (transfer none): an #NMSettingWired if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingWired if the connection contains one, otherwise %NULL **/ NMSettingWired * nm_connection_get_setting_wired (NMConnection *connection) @@ -1546,7 +1546,7 @@ nm_connection_get_setting_wired (NMConnection *connection) * * A shortcut to return any #NMSettingAdsl the connection might contain. * - * Returns: (transfer none): an #NMSettingAdsl if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingAdsl if the connection contains one, otherwise %NULL **/ NMSettingAdsl * nm_connection_get_setting_adsl (NMConnection *connection) @@ -1563,7 +1563,7 @@ nm_connection_get_setting_adsl (NMConnection *connection) * * A shortcut to return any #NMSettingWireless the connection might contain. * - * Returns: (transfer none): an #NMSettingWireless if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingWireless if the connection contains one, otherwise %NULL **/ NMSettingWireless * nm_connection_get_setting_wireless (NMConnection *connection) @@ -1580,7 +1580,7 @@ nm_connection_get_setting_wireless (NMConnection *connection) * * A shortcut to return any #NMSettingWirelessSecurity the connection might contain. * - * Returns: (transfer none): an #NMSettingWirelessSecurity if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingWirelessSecurity if the connection contains one, otherwise %NULL **/ NMSettingWirelessSecurity * nm_connection_get_setting_wireless_security (NMConnection *connection) @@ -1597,7 +1597,7 @@ nm_connection_get_setting_wireless_security (NMConnection *connection) * * A shortcut to return any #NMSettingBridgePort the connection might contain. * - * Returns: (transfer none): an #NMSettingBridgePort if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingBridgePort if the connection contains one, otherwise %NULL **/ NMSettingBridgePort * nm_connection_get_setting_bridge_port (NMConnection *connection) @@ -1614,7 +1614,7 @@ nm_connection_get_setting_bridge_port (NMConnection *connection) * * A shortcut to return any #NMSettingVlan the connection might contain. * - * Returns: (transfer none): an #NMSettingVlan if the connection contains one, otherwise NULL + * Returns: (transfer none): an #NMSettingVlan if the connection contains one, otherwise %NULL **/ NMSettingVlan * nm_connection_get_setting_vlan (NMConnection *connection) diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c index 32eda889..0a9a2104 100644 --- a/libnm-util/nm-setting-8021x.c +++ b/libnm-util/nm-setting-8021x.c @@ -488,7 +488,7 @@ path_to_scheme_value (const char *path) * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the CA certificate * file (PEM or DER format). The path must be UTF-8 encoded; use - * g_filename_to_utf8() to convert if needed. Passing NULL with any @scheme + * g_filename_to_utf8() to convert if needed. Passing %NULL with any @scheme * clears the CA certificate. * @scheme: desired storage scheme for the certificate * @out_format: on successful return, the type of the certificate added @@ -538,29 +538,23 @@ nm_setting_802_1x_set_ca_cert (NMSetting8021x *self, data = crypto_load_and_verify_certificate (cert_path, &format, error); if (data) { /* wpa_supplicant can only use raw x509 CA certs */ - switch (format) { - case NM_CRYPTO_FILE_FORMAT_X509: + if (format == NM_CRYPTO_FILE_FORMAT_X509) { if (out_format) *out_format = NM_SETTING_802_1X_CK_FORMAT_X509; - break; - default: - g_byte_array_free (data, TRUE); - data = NULL; - g_set_error (error, - NM_SETTING_802_1X_ERROR, - NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, - NM_SETTING_802_1X_CA_CERT); - break; - } - if (data) { if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - priv->ca_cert = data; + priv->ca_cert = g_byte_array_ref (data); else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) priv->ca_cert = path_to_scheme_value (cert_path); else g_assert_not_reached (); + } else { + g_set_error (error, + NM_SETTING_802_1X_ERROR, + NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, + NM_SETTING_802_1X_CA_CERT); } + g_byte_array_unref (data); } return priv->ca_cert != NULL; @@ -572,7 +566,7 @@ nm_setting_802_1x_set_ca_cert (NMSetting8021x *self, * * Returns: the #NMSetting8021x:subject-match property. This is the * substring to be matched against the subject of the authentication - * server certificate, or NULL no subject verification is to be + * server certificate, or %NULL no subject verification is to be * performed. **/ const char * @@ -765,7 +759,7 @@ nm_setting_802_1x_get_client_cert_path (NMSetting8021x *setting) * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the client * certificate file (PEM, DER, or PKCS#12 format). The path must be UTF-8 - * encoded; use g_filename_to_utf8() to convert if needed. Passing NULL with + * encoded; use g_filename_to_utf8() to convert if needed. Passing %NULL with * any @scheme clears the client certificate. * @scheme: desired storage scheme for the certificate * @out_format: on successful return, the type of the certificate added @@ -818,19 +812,20 @@ nm_setting_802_1x_set_client_cert (NMSetting8021x *self, data = crypto_load_and_verify_certificate (cert_path, &format, error); if (data) { - /* wpa_supplicant can only use raw x509 CA certs */ + gboolean valid = FALSE; + switch (format) { case NM_CRYPTO_FILE_FORMAT_X509: if (out_format) *out_format = NM_SETTING_802_1X_CK_FORMAT_X509; + valid = TRUE; break; case NM_CRYPTO_FILE_FORMAT_PKCS12: if (out_format) *out_format = NM_SETTING_802_1X_CK_FORMAT_PKCS12; + valid = TRUE; break; default: - g_byte_array_free (data, TRUE); - data = NULL; g_set_error (error, NM_SETTING_802_1X_ERROR, NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, @@ -838,14 +833,15 @@ nm_setting_802_1x_set_client_cert (NMSetting8021x *self, break; } - if (data) { + if (valid) { if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - priv->client_cert = data; + priv->client_cert = g_byte_array_ref (data); else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) priv->client_cert = path_to_scheme_value (cert_path); else g_assert_not_reached (); } + g_byte_array_unref (data); } return priv->client_cert != NULL; @@ -857,7 +853,7 @@ nm_setting_802_1x_set_client_cert (NMSetting8021x *self, * * Returns: the "phase 1" PEAP version to be used when authenticating with * EAP-PEAP as contained in the #NMSetting8021x:phase1-peapver property. Valid - * values are NULL (unset), "0" (PEAP version 0), and "1" (PEAP version 1). + * values are %NULL (unset), "0" (PEAP version 0), and "1" (PEAP version 1). **/ const char * nm_setting_802_1x_get_phase1_peapver (NMSetting8021x *setting) @@ -873,7 +869,7 @@ nm_setting_802_1x_get_phase1_peapver (NMSetting8021x *setting) * * Returns: whether the "phase 1" PEAP label is new-style or old-style, to be * used when authenticating with EAP-PEAP, as contained in the - * #NMSetting8021x:phase1-peaplabel property. Valid values are NULL (unset), + * #NMSetting8021x:phase1-peaplabel property. Valid values are %NULL (unset), * "0" (use old-style label), and "1" (use new-style label). See the * wpa_supplicant documentation for more details. **/ @@ -1028,7 +1024,7 @@ nm_setting_802_1x_get_phase2_ca_cert_path (NMSetting8021x *setting) * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the "phase2" CA * certificate file (PEM or DER format). The path must be UTF-8 encoded; use - * g_filename_to_utf8() to convert if needed. Passing NULL with any @scheme + * g_filename_to_utf8() to convert if needed. Passing %NULL with any @scheme * clears the "phase2" CA certificate. * @scheme: desired storage scheme for the certificate * @out_format: on successful return, the type of the certificate added @@ -1078,29 +1074,23 @@ nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *self, data = crypto_load_and_verify_certificate (cert_path, &format, error); if (data) { /* wpa_supplicant can only use raw x509 CA certs */ - switch (format) { - case NM_CRYPTO_FILE_FORMAT_X509: + if (format == NM_CRYPTO_FILE_FORMAT_X509) { if (out_format) *out_format = NM_SETTING_802_1X_CK_FORMAT_X509; - break; - default: - g_byte_array_free (data, TRUE); - data = NULL; - g_set_error (error, - NM_SETTING_802_1X_ERROR, - NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, - NM_SETTING_802_1X_PHASE2_CA_CERT); - break; - } - if (data) { if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - priv->phase2_ca_cert = data; + priv->phase2_ca_cert = g_byte_array_ref (data); else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) priv->phase2_ca_cert = path_to_scheme_value (cert_path); else g_assert_not_reached (); + } else { + g_set_error (error, + NM_SETTING_802_1X_ERROR, + NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, + NM_SETTING_802_1X_PHASE2_CA_CERT); } + g_byte_array_unref (data); } return priv->phase2_ca_cert != NULL; @@ -1112,7 +1102,7 @@ nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *self, * * Returns: the #NMSetting8021x:phase2-subject-match property. This is * the substring to be matched against the subject of the "phase 2" - * authentication server certificate, or NULL no subject verification + * authentication server certificate, or %NULL no subject verification * is to be performed. **/ const char * @@ -1309,7 +1299,7 @@ nm_setting_802_1x_get_phase2_client_cert_path (NMSetting8021x *setting) * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the "phase2" client * certificate file (PEM, DER, or PKCS#12 format). The path must be UTF-8 - * encoded; use g_filename_to_utf8() to convert if needed. Passing NULL with + * encoded; use g_filename_to_utf8() to convert if needed. Passing %NULL with * any @scheme clears the "phase2" client certificate. * @scheme: desired storage scheme for the certificate * @out_format: on successful return, the type of the certificate added @@ -1362,19 +1352,21 @@ nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *self, data = crypto_load_and_verify_certificate (cert_path, &format, error); if (data) { + gboolean valid = FALSE; + /* wpa_supplicant can only use raw x509 CA certs */ switch (format) { case NM_CRYPTO_FILE_FORMAT_X509: if (out_format) *out_format = NM_SETTING_802_1X_CK_FORMAT_X509; + valid = TRUE; break; case NM_CRYPTO_FILE_FORMAT_PKCS12: if (out_format) *out_format = NM_SETTING_802_1X_CK_FORMAT_PKCS12; + valid = TRUE; break; default: - g_byte_array_free (data, TRUE); - data = NULL; g_set_error (error, NM_SETTING_802_1X_ERROR, NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, @@ -1382,14 +1374,15 @@ nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *self, break; } - if (data) { + if (valid) { if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - priv->phase2_client_cert = data; + priv->phase2_client_cert = g_byte_array_ref (data); else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) priv->phase2_client_cert = path_to_scheme_value (cert_path); else g_assert_not_reached (); } + g_byte_array_unref (data); } return priv->phase2_client_cert != NULL; @@ -1579,7 +1572,7 @@ file_to_byte_array (const char *filename) * @key_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH or * %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the private key file * (PEM, DER, or PKCS#12 format). The path must be UTF-8 encoded; use - * g_filename_to_utf8() to convert if needed. Passing NULL with any @scheme + * g_filename_to_utf8() to convert if needed. Passing %NULL with any @scheme * clears the private key. * @password: password used to decrypt the private key, or %NULL if the password * is unknown. If the password is given but fails to decrypt the private key, @@ -1872,7 +1865,7 @@ nm_setting_802_1x_get_phase2_private_key_path (NMSetting8021x *setting) * @key_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH or * %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the "phase2" private * key file (PEM, DER, or PKCS#12 format). The path must be UTF-8 encoded; - * use g_filename_to_utf8() to convert if needed. Passing NULL with any + * use g_filename_to_utf8() to convert if needed. Passing %NULL with any * @scheme clears the private key. * @password: password used to decrypt the private key, or %NULL if the password * is unknown. If the password is given but fails to decrypt the private key, @@ -2580,6 +2573,7 @@ finalize (GObject *object) g_free (priv->password); if (priv->password_raw) g_byte_array_free (priv->password_raw, TRUE); + g_free (priv->pin); nm_utils_slist_free (priv->eap, g_free); nm_utils_slist_free (priv->altsubject_matches, g_free); @@ -2791,6 +2785,13 @@ set_property (GObject *object, guint prop_id, case PROP_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS: priv->phase2_private_key_password_flags = g_value_get_uint (value); break; + case PROP_PIN: + g_free (priv->pin); + priv->pin = g_value_dup_string (value); + break; + case PROP_PIN_FLAGS: + priv->pin_flags = g_value_get_uint (value); + break; case PROP_SYSTEM_CA_CERTS: priv->system_ca_certs = g_value_get_boolean (value); break; @@ -2895,6 +2896,12 @@ get_property (GObject *object, guint prop_id, case PROP_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS: g_value_set_uint (value, priv->phase2_private_key_password_flags); break; + case PROP_PIN: + g_value_set_string (value, priv->pin); + break; + case PROP_PIN_FLAGS: + g_value_set_uint (value, priv->pin_flags); + break; case PROP_SYSTEM_CA_CERTS: g_value_set_boolean (value, priv->system_ca_certs); break; @@ -3354,7 +3361,7 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) (object_class, PROP_PASSWORD, g_param_spec_string (NM_SETTING_802_1X_PASSWORD, "Password", - "Password used for EAP authentication methods.", + "UTF-8 encoded password used for EAP authentication methods.", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_SECRET)); @@ -3384,7 +3391,12 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) (object_class, PROP_PASSWORD_RAW, _nm_param_spec_specialized (NM_SETTING_802_1X_PASSWORD_RAW, "Password byte array", - "Password used for EAP authentication methods as a byte array", + "Password used for EAP authentication " + "methods, given as a byte array to allow " + "passwords in other encodings than UTF-8 " + "to be used. If both 'password' and " + "'password-raw' are given, 'password' is " + "preferred.", DBUS_TYPE_G_UCHAR_ARRAY, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_SECRET)); @@ -3559,6 +3571,33 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class) G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); /** + * NMSetting8021x:pin: + * + * PIN used for EAP authentication methods. + **/ + g_object_class_install_property + (object_class, PROP_PIN, + g_param_spec_string (NM_SETTING_802_1X_PIN, + "PIN", + "PIN used for EAP authentication methods.", + NULL, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_SECRET)); + + /** + * NMSetting8021x:pin-flags: + * + * Flags indicating how to handle #NMSetting8021x:pin:. + **/ + g_object_class_install_property (object_class, PROP_PIN_FLAGS, + g_param_spec_uint (NM_SETTING_802_1X_PIN_FLAGS, + "PIN Flags", + "Flags indicating how to handle the 802.1x PIN.", + NM_SETTING_SECRET_FLAG_NONE, + NM_SETTING_SECRET_FLAGS_ALL, + NM_SETTING_SECRET_FLAG_NONE, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + + /** * NMSetting8021x:system-ca-certs: * * When TRUE, overrides #NMSetting8021x:ca-path and diff --git a/libnm-util/nm-setting-bluetooth.c b/libnm-util/nm-setting-bluetooth.c index 161b3715..e81e5333 100644 --- a/libnm-util/nm-setting-bluetooth.c +++ b/libnm-util/nm-setting-bluetooth.c @@ -216,6 +216,7 @@ finalize (GObject *object) if (priv->bdaddr) g_byte_array_free (priv->bdaddr, TRUE); + g_free (priv->type); G_OBJECT_CLASS (nm_setting_bluetooth_parent_class)->finalize (object); } diff --git a/libnm-util/nm-setting-bond.c b/libnm-util/nm-setting-bond.c index a3dbd766..e8e7b639 100644 --- a/libnm-util/nm-setting-bond.c +++ b/libnm-util/nm-setting-bond.c @@ -257,11 +257,16 @@ gboolean nm_setting_bond_add_option (NMSettingBond *setting, g_hash_table_insert (priv->options, g_strdup (name), g_strdup (value)); - if (!strcmp (name, NM_SETTING_BOND_OPTION_MIIMON)) { + if ( !strcmp (name, NM_SETTING_BOND_OPTION_MIIMON) + && strcmp (value, "0") != 0) { g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL); g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); - } else if (!strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL)) + } else if ( !strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL) + && strcmp (value, "0") != 0) { g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_MIIMON); + g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY); + g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_UPDELAY); + } return TRUE; } @@ -293,7 +298,7 @@ nm_setting_bond_remove_option (NMSettingBond *setting, * * Returns a list of valid bond options. * - * Returns: (transfer none): a NULL-terminated array of strings of valid bond options. + * Returns: (transfer none): a %NULL-terminated array of strings of valid bond options. **/ const char ** nm_setting_bond_get_valid_options (NMSettingBond *setting) diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c index d4de1253..4d990643 100644 --- a/libnm-util/nm-setting-connection.c +++ b/libnm-util/nm-setting-connection.c @@ -276,7 +276,7 @@ nm_setting_connection_get_num_permissions (NMSettingConnection *setting) * @out_ptype: on return, the permission type (at this time, always "user") * @out_pitem: on return, the permission item (formatted accoring to @ptype, see * #NMSettingConnection:permissions for more detail - * @out_detail: on return, the permission detail (at this time, always NULL) + * @out_detail: on return, the permission detail (at this time, always %NULL) * * Retrieve one of the entries of the #NMSettingConnection:permissions property * of this setting. @@ -773,6 +773,7 @@ finalize (GObject *object) g_free (priv->master); g_free (priv->slave_type); nm_utils_slist_free (priv->permissions, (GDestroyNotify) permission_free); + nm_utils_slist_free (priv->secondaries, g_free); G_OBJECT_CLASS (nm_setting_connection_parent_class)->finalize (object); } diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c index ea83c73c..41e080ba 100644 --- a/libnm-util/nm-setting-gsm.c +++ b/libnm-util/nm-setting-gsm.c @@ -684,20 +684,20 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class) "not all devices allow frequency band control.", NM_SETTING_GSM_BAND_UNKNOWN, NM_SETTING_GSM_BAND_UNKNOWN - || NM_SETTING_GSM_BAND_ANY - || NM_SETTING_GSM_BAND_EGSM - || NM_SETTING_GSM_BAND_DCS - || NM_SETTING_GSM_BAND_PCS - || NM_SETTING_GSM_BAND_G850 - || NM_SETTING_GSM_BAND_U2100 - || NM_SETTING_GSM_BAND_U1800 - || NM_SETTING_GSM_BAND_U17IV - || NM_SETTING_GSM_BAND_U800 - || NM_SETTING_GSM_BAND_U850 - || NM_SETTING_GSM_BAND_U900 - || NM_SETTING_GSM_BAND_U17IX - || NM_SETTING_GSM_BAND_U1900 - || NM_SETTING_GSM_BAND_U2600, + | NM_SETTING_GSM_BAND_ANY + | NM_SETTING_GSM_BAND_EGSM + | NM_SETTING_GSM_BAND_DCS + | NM_SETTING_GSM_BAND_PCS + | NM_SETTING_GSM_BAND_G850 + | NM_SETTING_GSM_BAND_U2100 + | NM_SETTING_GSM_BAND_U1800 + | NM_SETTING_GSM_BAND_U17IV + | NM_SETTING_GSM_BAND_U800 + | NM_SETTING_GSM_BAND_U850 + | NM_SETTING_GSM_BAND_U900 + | NM_SETTING_GSM_BAND_U17IX + | NM_SETTING_GSM_BAND_U1900 + | NM_SETTING_GSM_BAND_U2600, NM_SETTING_GSM_BAND_ANY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c index c6becefb..90534c12 100644 --- a/libnm-util/nm-setting-ip4-config.c +++ b/libnm-util/nm-setting-ip4-config.c @@ -678,6 +678,15 @@ nm_setting_ip4_config_get_may_fail (NMSettingIP4Config *setting) return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->may_fail; } +static gint +find_setting_by_name (gconstpointer a, gconstpointer b) +{ + NMSetting *setting = NM_SETTING (a); + const char *str = (const char *) b; + + return strcmp (nm_setting_get_name (setting), str); +} + static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { @@ -737,6 +746,22 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return FALSE; } + /* Disabled method is not allowed when IPv6 is set to 'ignore' */ + if (!strcmp (priv->method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { + GSList *list = g_slist_find_custom (all_settings, NM_SETTING_IP6_CONFIG_SETTING_NAME, find_setting_by_name); + if (list) { + NMSettingIP6Config *s_ip6 = g_slist_nth_data (list, 0); + if ( s_ip6 + && !g_strcmp0 (nm_setting_ip6_config_get_method (s_ip6), NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { + g_set_error (error, + NM_SETTING_IP4_CONFIG_ERROR, + NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY, + NM_SETTING_IP4_CONFIG_METHOD); + return FALSE; + } + } + } + if (priv->dhcp_client_id && !strlen (priv->dhcp_client_id)) { g_set_error (error, NM_SETTING_IP4_CONFIG_ERROR, @@ -818,6 +843,8 @@ finalize (GObject *object) NMSettingIP4ConfigPrivate *priv = NM_SETTING_IP4_CONFIG_GET_PRIVATE (self); g_free (priv->method); + g_free (priv->dhcp_hostname); + g_free (priv->dhcp_client_id); g_array_free (priv->dns, TRUE); diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c index 81857134..b83e3dab 100644 --- a/libnm-util/nm-setting-ip6-config.c +++ b/libnm-util/nm-setting-ip6-config.c @@ -662,6 +662,15 @@ nm_setting_ip6_config_get_ip6_privacy (NMSettingIP6Config *setting) return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->ip6_privacy; } +static gint +find_setting_by_name (gconstpointer a, gconstpointer b) +{ + NMSetting *setting = NM_SETTING (a); + const char *str = (const char *) b; + + return strcmp (nm_setting_get_name (setting), str); +} + static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { @@ -720,6 +729,22 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return FALSE; } + /* Method 'ignore' is not allowed when IPv4 is set to 'disabled' */ + if (!strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { + GSList *list = g_slist_find_custom (all_settings, NM_SETTING_IP4_CONFIG_SETTING_NAME, find_setting_by_name); + if (list) { + NMSettingIP4Config *s_ip4 = g_slist_nth_data (list, 0); + if ( s_ip4 + && !g_strcmp0 (nm_setting_ip4_config_get_method (s_ip4), NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { + g_set_error (error, + NM_SETTING_IP6_CONFIG_ERROR, + NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY, + NM_SETTING_IP6_CONFIG_METHOD); + return FALSE; + } + } + } + if (priv->dhcp_hostname && !strlen (priv->dhcp_hostname)) { g_set_error (error, NM_SETTING_IP6_CONFIG_ERROR, @@ -744,6 +769,8 @@ finalize (GObject *object) NMSettingIP6ConfigPrivate *priv = NM_SETTING_IP6_CONFIG_GET_PRIVATE (object); g_free (priv->method); + g_free (priv->dhcp_hostname); + g_slist_free (priv->dns); nm_utils_slist_free (priv->dns_search, g_free); @@ -762,7 +789,10 @@ set_property (GObject *object, guint prop_id, switch (prop_id) { case PROP_METHOD: g_free (priv->method); - priv->method = g_value_dup_string (value); + if (g_strcmp0 (g_value_get_string (value), "disabled") == 0) + priv->method = g_strdup (NM_SETTING_IP6_CONFIG_METHOD_IGNORE); + else + priv->method = g_value_dup_string (value); break; case PROP_DNS: nm_utils_slist_free (priv->dns, g_free); @@ -876,7 +906,7 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) * based hardware. If 'link-local' is specified, then an IPv6 link-local * address will be assigned to the interface. If 'manual' is specified, * static IP addressing is used and at least one IP address must be given - * in the 'addresses' property. If 'ignored' is specified, IPv6 + * in the 'addresses' property. If 'ignore' is specified, IPv6 * configuration is not done. This property must be set. NOTE: the 'shared' * method are not yet supported. **/ @@ -894,7 +924,7 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) "address will be assigned to the interface. If " "'manual' is specified, static IP addressing is " "used and at least one IP address must be given in " - " the 'addresses' property. If 'ignored' is " + " the 'addresses' property. If 'ignore' is " "specified, IPv6 configuration is not done. This " "property must be set. NOTE: the 'shared' method" "is not yet supported.", diff --git a/libnm-util/nm-setting-pppoe.c b/libnm-util/nm-setting-pppoe.c index 2785dfa9..f37ec000 100644 --- a/libnm-util/nm-setting-pppoe.c +++ b/libnm-util/nm-setting-pppoe.c @@ -258,6 +258,18 @@ get_property (GObject *object, guint prop_id, } static void +finalize (GObject *object) +{ + NMSettingPPPOEPrivate *priv = NM_SETTING_PPPOE_GET_PRIVATE (object); + + g_free (priv->username); + g_free (priv->password); + g_free (priv->service); + + G_OBJECT_CLASS (nm_setting_pppoe_parent_class)->finalize (object); +} + +static void nm_setting_pppoe_class_init (NMSettingPPPOEClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); @@ -268,6 +280,7 @@ nm_setting_pppoe_class_init (NMSettingPPPOEClass *setting_class) /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; + object_class->finalize = finalize; parent_class->verify = verify; parent_class->need_secrets = need_secrets; diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c index df7f0702..da1cb7f8 100644 --- a/libnm-util/nm-setting-vlan.c +++ b/libnm-util/nm-setting-vlan.c @@ -407,8 +407,8 @@ nm_setting_vlan_remove_priority (NMSettingVlan *setting, list = get_map (setting, map); g_return_if_fail (idx < g_slist_length (list)); - item = g_slist_nth_data (list, idx); - priority_map_free ((PriorityMap *) item); + item = g_slist_nth (list, idx); + priority_map_free ((PriorityMap *) (item->data)); set_map (setting, map, g_slist_delete_link (list, item)); } @@ -636,6 +636,8 @@ finalize (GObject *object) g_free (priv->parent); nm_utils_slist_free (priv->ingress_priority_map, g_free); nm_utils_slist_free (priv->egress_priority_map, g_free); + + G_OBJECT_CLASS (nm_setting_vlan_parent_class)->finalize (object); } static void diff --git a/libnm-util/nm-setting-wired.c b/libnm-util/nm-setting-wired.c index f44d6df6..6d1afc67 100644 --- a/libnm-util/nm-setting-wired.c +++ b/libnm-util/nm-setting-wired.c @@ -349,7 +349,7 @@ nm_setting_wired_get_s390_option (NMSettingWired *setting, * Returns the value associated with the s390-specific option specified by * @key, if it exists. * - * Returns: the value, or NULL if the key/value pair was never added to the + * Returns: the value, or %NULL if the key/value pair was never added to the * setting; the value is owned by the setting and must not be modified **/ const char * @@ -537,6 +537,11 @@ finalize (GObject *object) nm_utils_slist_free (priv->mac_address_blacklist, g_free); + if (priv->s390_subchannels) { + g_ptr_array_foreach (priv->s390_subchannels, (GFunc) g_free, NULL); + g_ptr_array_free (priv->s390_subchannels, TRUE); + } + G_OBJECT_CLASS (nm_setting_wired_parent_class)->finalize (object); } diff --git a/libnm-util/nm-setting-wireless-security.c b/libnm-util/nm-setting-wireless-security.c index 5dec266f..9e4becca 100644 --- a/libnm-util/nm-setting-wireless-security.c +++ b/libnm-util/nm-setting-wireless-security.c @@ -1301,38 +1301,44 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *setting /** * NMSettingWirelessSecurity:pairwise: * - * If specified, will only connect to WPA networks that provide the - * specified pairwise encryption capabilities. Each element may be one of - * 'wep40', 'wep104', 'tkip', or 'ccmp'. + * A list of pairwise encryption algorithms which prevents connections to + * Wi-Fi networks that do not utilize one of the algorithms in the list. For + * maximum compatibility leave this property empty. Each list element may + * be one of 'wep40', 'wep104', 'tkip', or 'ccmp'. **/ g_object_class_install_property (object_class, PROP_PAIRWISE, _nm_param_spec_specialized (NM_SETTING_WIRELESS_SECURITY_PAIRWISE, - "Pairwise", - "If specified, will only connect to WPA networks " - "that provide the specified pairwise encryption " - "capabilities. Each element may be one of 'wep40', " - "'wep104', 'tkip', or 'ccmp'.", - DBUS_TYPE_G_LIST_OF_STRING, - G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + "Pairwise", + "A list of pairwise encryption algorithms which " + "prevents connections to Wi-Fi networks that do " + "not utilize one of the algorithms in the list. " + "For maximum compatibility leave this property " + "empty. Each list element may be one of 'wep40', " + "'wep104', 'tkip' or 'ccmp'.", + DBUS_TYPE_G_LIST_OF_STRING, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); /** * NMSettingWirelessSecurity:group: * - * If specified, will only connect to WPA networks that provide the - * specified group/multicast encryption capabilities. Each element may be - * one of 'wep40', 'wep104', 'tkip', or 'ccmp'. + * A list of group/broadcast encryption algorithms which prevents + * connections to Wi-Fi networks that do not utilize one of the algorithms + * in the list. For maximum compatibility leave this property empty. Each + * list element may be one of 'wep40', 'wep104', 'tkip', or 'ccmp'. **/ g_object_class_install_property (object_class, PROP_GROUP, _nm_param_spec_specialized (NM_SETTING_WIRELESS_SECURITY_GROUP, - "Group", - "If specified, will only connect to WPA networks " - "that provide the specified group/multicast " - "encryption capabilities. Each element may be " - "one of 'wep40', 'wep104', 'tkip', or 'ccmp'.", - DBUS_TYPE_G_LIST_OF_STRING, - G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + "Group", + "A list of group/broadcast encryption algorithms " + "which prevents connections to Wi-Fi networks " + "that do not utilize one of the algorithms in " + "the list. For maximum compatibility leave this " + "property empty. Each list element may be one " + " of 'wep40', 'wep104', 'tkip', or 'ccmp'.", + DBUS_TYPE_G_LIST_OF_STRING, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); /** * NMSettingWirelessSecurity:leap-username: diff --git a/libnm-util/nm-setting-wireless.c b/libnm-util/nm-setting-wireless.c index ace22cbc..1cd07c92 100644 --- a/libnm-util/nm-setting-wireless.c +++ b/libnm-util/nm-setting-wireless.c @@ -1048,19 +1048,19 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_class) /** * NMSettingWireless:mac-address-blacklist: * - * If specified, this connection will never apply to the WiFi device - * whose permanent MAC address matches an address in the list. Each - * MAC address is in the standard hex-digits-and-colons notation. - * (00:11:22:33:44:55). + * A list of permanent MAC addresses of Wi-Fi devices to which this + * connection should never apply. Each MAC address should be given in the + * standard hex-digits-and-colons notation (eg '00:11:22:33:44:55'). **/ g_object_class_install_property (object_class, PROP_MAC_ADDRESS_BLACKLIST, _nm_param_spec_specialized (NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST, "MAC Address Blacklist", - "If specified, this connection will never apply to " - "the WiFi device whose permanent MAC address matches " - "an address in the list. Each MAC address is in the " - "standard hex-digits-and-colons notation (00:11:22:33:44:55).", + "A list of permanent MAC addresses of Wi-Fi " + "devices to which this connection should " + "never apply. Each MAC address should be " + "given in the standard hex-digits-and-colons " + "notation (eg '00:11:22:33:44:55').", DBUS_TYPE_G_LIST_OF_STRING, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE)); diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c index 21dab0ba..f80c72b8 100644 --- a/libnm-util/nm-setting.c +++ b/libnm-util/nm-setting.c @@ -200,7 +200,7 @@ one_property_cb (gpointer key, gpointer val, gpointer user_data) * property names and value types. * * Returns: a new #NMSetting object populated with the properties from the - * hash table, or NULL on failure + * hash table, or %NULL on failure **/ NMSetting * nm_setting_new_from_hash (GType setting_type, GHashTable *hash) @@ -690,10 +690,10 @@ nm_setting_clear_secrets_with_flags (NMSetting *setting, * guide to what secrets may be required, because in some circumstances, there * is no way to conclusively determine exactly which secrets are needed. * - * Returns: (transfer full) (element-type utf8): a #GPtrArray containing the property names of secrets of the - * #NMSetting which may be required; the caller owns the array - * and must free the each array element with g_free(), as well as the array - * itself with g_ptr_array_free() + * Returns: (transfer container) (element-type utf8): a #GPtrArray containing + * the property names of secrets of the #NMSetting which may be required; the + * caller owns the array and must free it with g_ptr_array_free(), but must not + * free the elements. **/ GPtrArray * nm_setting_need_secrets (NMSetting *setting) @@ -754,8 +754,8 @@ update_one_secret (NMSetting *setting, const char *key, GValue *value, GError ** * Update the setting's secrets, given a hash table of secrets intended for that * setting (deserialized from D-Bus for example). * - * Returns: %TRUE if the secrets were successfully updated and the connection - * is valid, %FALSE on failure or if the setting was never added to the connection + * Returns: %TRUE if the secrets were successfully updated, %FALSE on failure to + * update one or more of the secrets. **/ gboolean nm_setting_update_secrets (NMSetting *setting, GHashTable *secrets, GError **error) diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index f955afbf..16adb2ba 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -292,7 +292,7 @@ nm_utils_deinit (void) * * Returns: (transfer full): an allocated string containing a UTF-8 * representation of the SSID, which must be freed by the caller using g_free(). - * Returns NULL on errors. + * Returns %NULL on errors. **/ char * nm_utils_ssid_to_utf8 (const GByteArray *ssid) @@ -1432,7 +1432,8 @@ nm_utils_wep_key_valid (const char *key, NMWepKeyType wep_type) return FALSE; keylen = strlen (key); - if (wep_type == NM_WEP_KEY_TYPE_KEY || NM_WEP_KEY_TYPE_UNKNOWN) { + if ( wep_type == NM_WEP_KEY_TYPE_KEY + || wep_type == NM_WEP_KEY_TYPE_UNKNOWN) { if (keylen == 10 || keylen == 26) { /* Hex key */ for (i = 0; i < keylen; i++) { @@ -2211,7 +2212,7 @@ utils_bin2hexstr (const char *bytes, int len, int final_len) * nm_utils_rsa_key_encrypt: * @data: RSA private key data to be encrypted * @in_password: (allow-none): existing password to use, if any - * @out_password: (out) (allow-none): if @in_password was NULL, a random password will be generated + * @out_password: (out) (allow-none): if @in_password was %NULL, a random password will be generated * and returned in this argument * @error: detailed error information on return, if an error occurred * @@ -2758,5 +2759,12 @@ nm_utils_is_uuid (const char *str) p++; } - return (num_dashes == 4) && (p - str == 36); + if ((num_dashes == 4) && (p - str == 36)) + return TRUE; + + /* Backwards compat for older configurations */ + if ((num_dashes == 0) && (p - str == 40)) + return TRUE; + + return FALSE; } diff --git a/libnm-util/tests/Makefile.in b/libnm-util/tests/Makefile.in index ee830f75..622f3d21 100644 --- a/libnm-util/tests/Makefile.in +++ b/libnm-util/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,7 +83,8 @@ host_triplet = @host@ @ENABLE_TESTS_TRUE@ test-general$(EXEEXT) \ @ENABLE_TESTS_TRUE@ test-setting-8021x$(EXEEXT) subdir = libnm-util/tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 \ @@ -88,6 +116,7 @@ am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = am__test_general_SOURCES_DIST = test-general.c @ENABLE_TESTS_TRUE@am_test_general_OBJECTS = \ @ENABLE_TESTS_TRUE@ test_general-test-general.$(OBJEXT) @@ -114,6 +143,18 @@ test_settings_defaults_OBJECTS = $(am_test_settings_defaults_OBJECTS) @ENABLE_TESTS_TRUE@test_settings_defaults_DEPENDENCIES = \ @ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-util/libnm-util.la \ @ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -126,20 +167,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(test_crypto_SOURCES) $(test_general_SOURCES) \ $(test_secrets_SOURCES) $(test_setting_8021x_SOURCES) \ $(test_settings_defaults_SOURCES) @@ -148,13 +185,14 @@ DIST_SOURCES = $(am__test_crypto_SOURCES_DIST) \ $(am__test_secrets_SOURCES_DIST) \ $(am__test_setting_8021x_SOURCES_DIST) \ $(am__test_settings_defaults_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -162,9 +200,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = certs @@ -335,7 +393,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -350,6 +407,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ +SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ @@ -541,18 +600,23 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + test-crypto$(EXEEXT): $(test_crypto_OBJECTS) $(test_crypto_DEPENDENCIES) $(EXTRA_test_crypto_DEPENDENCIES) @rm -f test-crypto$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_crypto_OBJECTS) $(test_crypto_LDADD) $(LIBS) + test-general$(EXEEXT): $(test_general_OBJECTS) $(test_general_DEPENDENCIES) $(EXTRA_test_general_DEPENDENCIES) @rm -f test-general$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_general_OBJECTS) $(test_general_LDADD) $(LIBS) + test-secrets$(EXEEXT): $(test_secrets_OBJECTS) $(test_secrets_DEPENDENCIES) $(EXTRA_test_secrets_DEPENDENCIES) @rm -f test-secrets$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_secrets_OBJECTS) $(test_secrets_LDADD) $(LIBS) + test-setting-8021x$(EXEEXT): $(test_setting_8021x_OBJECTS) $(test_setting_8021x_DEPENDENCIES) $(EXTRA_test_setting_8021x_DEPENDENCIES) @rm -f test-setting-8021x$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_setting_8021x_OBJECTS) $(test_setting_8021x_LDADD) $(LIBS) + test-settings-defaults$(EXEEXT): $(test_settings_defaults_OBJECTS) $(test_settings_defaults_DEPENDENCIES) $(EXTRA_test_settings_defaults_DEPENDENCIES) @rm -f test-settings-defaults$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_settings_defaults_OBJECTS) $(test_settings_defaults_LDADD) $(LIBS) @@ -667,22 +731,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -697,57 +764,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -763,12 +785,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -780,15 +797,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -797,6 +810,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -964,23 +992,22 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am check-local clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am check-local clean clean-generic clean-libtool \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am @ENABLE_TESTS_TRUE@check-local: test-settings-defaults test-crypto test-secrets diff --git a/libnm-util/tests/certs/Makefile.in b/libnm-util/tests/certs/Makefile.in index 9b8f9d3d..0b70b59c 100644 --- a/libnm-util/tests/certs/Makefile.in +++ b/libnm-util/tests/certs/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -24,23 +23,51 @@ # -name "test-pkcs12" \ # -out test-cert.p12 VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -60,7 +87,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libnm-util/tests/certs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 \ @@ -80,12 +107,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -93,6 +126,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -235,7 +269,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -250,6 +283,8 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ +SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ @@ -385,11 +420,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -525,15 +560,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c index 7c5399df..9576f05a 100644 --- a/libnm-util/tests/test-general.c +++ b/libnm-util/tests/test-general.c @@ -1362,6 +1362,29 @@ test_hwaddr_aton_malformed (void) g_assert (nm_utils_hwaddr_aton ("0:1a:2B:3:a@%%", ARPHRD_ETHER, buf) == NULL); } +static void +test_setting_old_uuid (void) +{ + GError *error = NULL; + NMSetting *setting; + gboolean success; + + /* NetworkManager-0.9.4.0 generated 40-character UUIDs with no dashes, + * like this one. Test that we maintain compatibility. */ + const char *uuid = "f43bec2cdd60e5da381ebb1eb1fa39f3cc52660c"; + + setting = nm_setting_connection_new (); + g_object_set (G_OBJECT (setting), + NM_SETTING_CONNECTION_ID, "uuidtest", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NULL); + + success = nm_setting_verify (NM_SETTING (setting), NULL, &error); + g_assert_no_error (error); + g_assert (success == TRUE); +} + int main (int argc, char **argv) { GError *error = NULL; @@ -1393,6 +1416,7 @@ int main (int argc, char **argv) test_setting_compare_vpn_secrets (NM_SETTING_SECRET_FLAG_NOT_SAVED, NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS, TRUE); test_setting_compare_vpn_secrets (NM_SETTING_SECRET_FLAG_NONE, NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS, TRUE); test_setting_compare_vpn_secrets (NM_SETTING_SECRET_FLAG_NONE, NM_SETTING_COMPARE_FLAG_EXACT, FALSE); + test_setting_old_uuid (); test_connection_to_hash_setting_name (); test_setting_connection_permissions_helpers (); |