pax_global_header00006660000000000000000000000064124164621060014514gustar00rootroot0000000000000052 comment=14112bdee63173aa401d381c4ef34054e008b9d1 network-manager-iodine-0.0.5/000077500000000000000000000000001241646210600160645ustar00rootroot00000000000000network-manager-iodine-0.0.5/.gitignore000066400000000000000000000005541241646210600200600ustar00rootroot00000000000000*~ *.o *.lo *.la Makefile Makefile.in* configure compile config.* aclocal.m4 depcomp install-sh libtool ltmain.sh missing mkinstalldirs POTFILES stamp-* .deps .libs TAGS autom4te.cache intltool-* po/*.gmo po/.intltool-merge-cache m4/gtk-doc.m4 m4/intltool.m4 m4/libtool.m4 m4/lt*.m4 nm-iodine-service.name src/nm-iodine-service auth-dialog/nm-iodine-auth-dialog network-manager-iodine-0.0.5/AUTHORS000066400000000000000000000000411241646210600171270ustar00rootroot00000000000000Guido Günther network-manager-iodine-0.0.5/COPYING000066400000000000000000000437711241646210600171330ustar00rootroot00000000000000Unless a COPYING file in a subdirectory or file-specific license headers specify a different license, the following applies to all files in this directory and all subdirectories. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. network-manager-iodine-0.0.5/Makefile.am000066400000000000000000000015661241646210600201300ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign SUBDIRS = src if WITH_GNOME SUBDIRS += properties po if WITH_AUTHDLG SUBDIRS += auth-dialog endif endif dbusservicedir = $(sysconfdir)/dbus-1/system.d dbusservice_DATA = nm-iodine-service.conf nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN nmvpnservice_DATA = nm-iodine-service.name nm-iodine-service.name: $(srcdir)/nm-iodine-service.name.in sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@ DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=yes EXTRA_DIST = nm-iodine-service.name.in \ $(dbusservice_DATA) \ $(desktop_in_files) \ $(icon_DATA) \ intltool-extract.in \ intltool-merge.in \ intltool-update.in CLEANFILES = $(nmvpnservice_DATA) $(desktop_DATA) *~ DISTCLEANFILES = intltool-extract intltool-merge intltool-update ACLOCAL_AMFLAGS = -I m4 network-manager-iodine-0.0.5/NEWS000066400000000000000000000017251241646210600165700ustar00rootroot00000000000000============= Version 0.0.5 ============= * Use libsecret * Use libmm-gtk * UI translations: Andika Triwidada (id) Antonio Fernandes C. Neto (pt_BR) A S Alam (pa) Aurimas Černius (lt) Balázs Úr (hu) Christian Kirbach (de) Daniel Mustieles (es) Dimitris Spingos (el) Gabor Kelemen (hu) Hajime Taira (ja) Marek Černocký (cs) Matej Urbančič (sl) Milo Casagrande (it) Piotr Drąg (pl) Rafael Ferreira (pt_BR) Rūdolfs Mazurs (lv) Tom Tryfonidis (el) Zdeněk Hataš (cs) Мирослав Николић (sr) (sr@latin) ============= Version 0.0.4 ============= * Add external ui support ============= Version 0.0.3 ============= * Pass the password via stdin * Distinguish login failures from other errors * Drop unused code * More flexible build-time warnings [Dan Williams] * UI translations: Piotr Drąg (pl) * Many thanks to Dan Williams for the review! ============= Version 0.0.2 ============= * Pass the password via the environment * Chroot iodine network-manager-iodine-0.0.5/auth-dialog/000077500000000000000000000000001241646210600202625ustar00rootroot00000000000000network-manager-iodine-0.0.5/auth-dialog/Makefile.am000066400000000000000000000011421241646210600223140ustar00rootroot00000000000000INCLUDES = -I${top_srcdir} libexec_PROGRAMS = nm-iodine-auth-dialog nm_iodine_auth_dialog_CPPFLAGS = \ $(NM_CFLAGS) \ $(GTHREAD_CFLAGS) \ $(GTK_CFLAGS) \ $(LIBSECRET_CFLAGS) \ $(NMGTK_CFLAGS) \ -DICONDIR=\""$(datadir)/pixmaps"\" \ -DBINDIR=\""$(bindir)"\" \ -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ -DGNOME_DISABLE_DEPRECATED \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DVERSION=\"$(VERSION)\" nm_iodine_auth_dialog_SOURCES = \ main.c \ $(NULL) nm_iodine_auth_dialog_LDADD = \ $(GTK_LIBS) \ $(NM_LIBS) \ $(NMGTK_LIBS) \ $(LIBSECRET_LIBS) CLEANFILES = *~ network-manager-iodine-0.0.5/auth-dialog/main.c000066400000000000000000000220551241646210600213560ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * Authentication dialog for NetworkManager iodine VPN connections * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright © 2012,2014 Guido Günther * * Heavily based on network-manager-pptp by Dan Williams */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #define SECRET_API_SUBJECT_TO_CHANGE #include #include #include #include #include "src/nm-iodine-service.h" #define KEYRING_UUID_TAG "connection-uuid" #define KEYRING_SN_TAG "setting-name" #define KEYRING_SK_TAG "setting-key" #define UI_KEYFILE_GROUP "VPN Plugin UI" static const SecretSchema network_manager_secret_schema = { "org.freedesktop.NetworkManager.Connection", SECRET_SCHEMA_DONT_MATCH_NAME, { { KEYRING_UUID_TAG, SECRET_SCHEMA_ATTRIBUTE_STRING }, { KEYRING_SN_TAG, SECRET_SCHEMA_ATTRIBUTE_STRING }, { KEYRING_SK_TAG, SECRET_SCHEMA_ATTRIBUTE_STRING }, { NULL, 0 }, } }; static void keyfile_add_entry_info (GKeyFile *keyfile, const gchar *key, const gchar *value, const gchar *label, gboolean is_secret, gboolean should_ask) { g_key_file_set_string (keyfile, key, "Value", value); g_key_file_set_string (keyfile, key, "Label", label); g_key_file_set_boolean (keyfile, key, "IsSecret", is_secret); g_key_file_set_boolean (keyfile, key, "ShouldAsk", should_ask); } static void keyfile_print_stdout (GKeyFile *keyfile) { gchar *data; gsize length; data = g_key_file_to_data (keyfile, &length, NULL); fputs (data, stdout); fflush (stdout); g_free (data); } static char * keyring_lookup_secret (const char *uuid, const char *secret_name) { GHashTable *attrs; GList *list; char *secret = NULL; attrs = secret_attributes_build (&network_manager_secret_schema, KEYRING_UUID_TAG, uuid, KEYRING_SN_TAG, NM_SETTING_VPN_SETTING_NAME, KEYRING_SK_TAG, secret_name, NULL); list = secret_service_search_sync (NULL, &network_manager_secret_schema, attrs, SECRET_SEARCH_ALL | SECRET_SEARCH_UNLOCK | SECRET_SEARCH_LOAD_SECRETS, NULL, NULL); if (list && list->data) { SecretItem *item = list->data; SecretValue *value = secret_item_get_secret (item); if (value) { secret = g_strdup (secret_value_get (value, NULL)); secret_value_unref (value); } } g_list_free_full (list, g_object_unref); g_hash_table_unref (attrs); return secret; } static gboolean get_secrets (const char *vpn_uuid, const char *vpn_name, gboolean retry, gboolean allow_interaction, gboolean external_ui_mode, const char *in_pw, char **out_pw, NMSettingSecretFlags pw_flags) { NMAVpnPasswordDialog *dialog; char *prompt, *pw = NULL; const char *new_password = NULL; gboolean success = FALSE; g_return_val_if_fail (vpn_uuid != NULL, FALSE); g_return_val_if_fail (vpn_name != NULL, FALSE); g_return_val_if_fail (out_pw != NULL, FALSE); g_return_val_if_fail (*out_pw == NULL, FALSE); /* Get the existing secret, if any */ if (!(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED) && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) { if (in_pw) pw = g_strdup (in_pw); else pw = keyring_lookup_secret (vpn_uuid, NM_IODINE_KEY_PASSWORD); } /* Don't ask if the passwords is unused */ if (pw_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED) { g_free (pw); return TRUE; } if (!retry) { /* Don't ask the user if we don't need a new password (ie, !retry), * we have an existing PW, and the password is saved. */ if (pw && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED)) { *out_pw = pw; return TRUE; } } prompt = g_strdup_printf (_("You need to authenticate to access the " "Virtual Private Network '%s'."), vpn_name); /* In external_ui mode, we don't actually show the dialog. *Instead we pass back everything that is needed to build it */ if (external_ui_mode) { GKeyFile *keyfile = g_key_file_new (); g_key_file_set_integer (keyfile, UI_KEYFILE_GROUP, "Version", 2); g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Description", prompt); g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Title", _("Authenticate VPN")); keyfile_add_entry_info (keyfile, NM_IODINE_KEY_PASSWORD, pw ? pw : "", _("Password:"), TRUE, allow_interaction); keyfile_print_stdout (keyfile); g_key_file_unref (keyfile); success = TRUE; goto out; } else if (allow_interaction == FALSE) { /* If interaction isn't allowed, just return existing secrets */ *out_pw = pw; success = TRUE; goto out; } /* Otherwise, we have no saved password, or the password flags indicated * that the password should never be saved. */ dialog = NMA_VPN_PASSWORD_DIALOG ( nma_vpn_password_dialog_new (_("Authenticate VPN"), prompt, NULL)); nma_vpn_password_dialog_set_show_password_secondary (dialog, FALSE); /* pre-fill dialog with the password */ if (pw && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED)) nma_vpn_password_dialog_set_password (dialog, pw); gtk_widget_show (GTK_WIDGET (dialog)); if (nma_vpn_password_dialog_run_and_block (dialog)) { new_password = nma_vpn_password_dialog_get_password (dialog); if (new_password) { *out_pw = g_strdup (new_password); success = TRUE; } } gtk_widget_hide (GTK_WIDGET (dialog)); gtk_widget_destroy (GTK_WIDGET (dialog)); out: g_free (prompt); return success; } static void wait_for_quit (void) { GString *str; char c; ssize_t n; time_t start; str = g_string_sized_new (10); start = time (NULL); do { errno = 0; n = read (0, &c, 1); if (n == 0 || (n < 0 && errno == EAGAIN)) g_usleep (G_USEC_PER_SEC / 10); else if (n == 1) { g_string_append_c (str, c); if (strstr (str->str, "QUIT") || (str->len > 10)) break; } else break; } while (time (NULL) < start + 20); g_string_free (str, TRUE); } int main (int argc, char *argv[]) { gboolean retry = FALSE; gboolean allow_interaction = FALSE; gboolean external_ui_mode = FALSE; char *vpn_name = NULL, *vpn_uuid = NULL, *vpn_service = NULL; char *password = NULL; GHashTable *data = NULL, *secrets = NULL; NMSettingSecretFlags pw_flags = NM_SETTING_SECRET_FLAG_NONE; GOptionContext *context; GOptionEntry entries[] = { { "reprompt", 'r', 0, G_OPTION_ARG_NONE, &retry, "Reprompt for passwords", NULL}, { "uuid", 'u', 0, G_OPTION_ARG_STRING, &vpn_uuid, "UUID of VPN connection", NULL}, { "name", 'n', 0, G_OPTION_ARG_STRING, &vpn_name, "Name of VPN connection", NULL}, { "service", 's', 0, G_OPTION_ARG_STRING, &vpn_service, "VPN service type", NULL}, { "allow-interaction", 'i', 0, G_OPTION_ARG_NONE, &allow_interaction, "Allow user interaction", NULL}, { "external-ui-mode", 0, 0, G_OPTION_ARG_NONE, &external_ui_mode, "External UI mode", NULL}, { NULL } }; bindtextdomain (GETTEXT_PACKAGE, NULL); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); gtk_init (&argc, &argv); context = g_option_context_new ("- iodine auth dialog"); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_parse (context, &argc, &argv, NULL); g_option_context_free (context); if (!nm_vpn_plugin_utils_read_vpn_details (0, &data, &secrets)) { fprintf (stderr, "Failed to read '%s' (%s) data and secrets from stdin.\n", vpn_name, vpn_uuid); return 1; } nm_vpn_plugin_utils_get_secret_flags (secrets, NM_IODINE_KEY_PASSWORD, &pw_flags); if (!get_secrets (vpn_uuid, vpn_name, retry, allow_interaction, external_ui_mode, g_hash_table_lookup (secrets, NM_IODINE_KEY_PASSWORD), &password, pw_flags)) return 1; if (!external_ui_mode) { /* dump the passwords to stdout */ if (password) printf ("%s\n%s\n", NM_IODINE_KEY_PASSWORD, password); printf ("\n\n"); /* for good measure, flush stdout since Kansas is going Bye-Bye */ fflush (stdout); /* Wait for quit signal */ wait_for_quit (); } if (data) g_hash_table_unref (data); if (secrets) g_hash_table_unref (secrets); return 0; } network-manager-iodine-0.0.5/autogen.sh000077500000000000000000000007331241646210600200700ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. REQUIRED_AUTOMAKE_VERSION=1.7 PKG_NAME=NetworkManager-iodine (test -f $srcdir/configure.ac) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } (cd $srcdir; autoreconf --install && intltoolize --force && autoreconf && ./configure --enable-maintainer-mode $@ ) network-manager-iodine-0.0.5/configure.ac000066400000000000000000000042271241646210600203570ustar00rootroot00000000000000AC_PREREQ(2.52) AC_INIT(NetworkManager-iodine, 0.0.5, agx@sigxcpu.org, NetworkManager-iodine) AM_INIT_AUTOMAKE([subdir-objects no-dist-gzip dist-xz]) AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) dnl dnl Require programs dnl AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL LT_INIT dnl dnl Required headers dnl AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h) dnl dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_TYPE_MODE_T AC_TYPE_PID_T AC_HEADER_TIME dnl dnl Checks for library functions. dnl AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_CHECK_FUNCS(select socket uname) dnl dnl GNOME support dnl AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-iodine without GNOME support, e.g. vpn service only])) AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno) AC_ARG_WITH(authdlg, AS_HELP_STRING([--without-authdlg], [Build NetworkManager-iodine without authentication dialog])) AM_CONDITIONAL(WITH_AUTHDLG, test x"$with_authdlg" != xno) GETTEXT_PACKAGE=NetworkManager-iodine AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) IT_PROG_INTLTOOL([0.35]) AM_GLIB_GNU_GETTEXT PKG_CHECK_MODULES(GTHREAD, gthread-2.0) AC_SUBST(GTHREAD_CFLAGS) AC_SUBST(GTHREAD_LIBS) PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) if test x"$with_gnome" != xno; then gtk3_req=2.91.4 PKG_CHECK_MODULES(GTK, gtk+-3.0 > $gtk3_req, , [PKG_CHECK_MODULES(GTK, gtk+-2.0 > $gtk2_req)]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) PKG_CHECK_MODULES(LIBSECRET, libsecret-1) AC_SUBST(LIBSECRET_CFLAGS) AC_SUBST(LIBSECRET_LIBS) fi PKG_CHECK_MODULES(NM, NetworkManager >= 0.9.2 libnm-util >= 0.9.2 libnm-glib >= 0.9.2 libnm-glib-vpn >= 0.9.2) AC_SUBST(NM_CFLAGS) AC_SUBST(NM_LIBS) PKG_CHECK_MODULES(NMGTK, libnm-gtk >= 0.9.9.0) AC_SUBST(NMGTK_CFLAGS) AC_SUBST(NMGTK_LIBS) NM_COMPILER_WARNINGS AC_CONFIG_FILES([ Makefile src/Makefile auth-dialog/Makefile properties/Makefile po/Makefile.in ]) AC_OUTPUT network-manager-iodine-0.0.5/m4/000077500000000000000000000000001241646210600164045ustar00rootroot00000000000000network-manager-iodine-0.0.5/m4/compiler_warnings.m4000066400000000000000000000017501241646210600223730ustar00rootroot00000000000000AC_DEFUN([NM_COMPILER_WARNINGS], [AC_ARG_ENABLE(more-warnings, AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]), set_more_warnings="$enableval",set_more_warnings=error) AC_MSG_CHECKING(for more warnings) if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then AC_MSG_RESULT(yes) CFLAGS="-Wall -std=gnu89 $CFLAGS" for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \ -Wdeclaration-after-statement -Wstrict-prototypes \ -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \ -fno-strict-aliasing; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" AC_MSG_CHECKING([whether gcc understands $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) if test $has_option = no; then CFLAGS="$SAVE_CFLAGS" fi AC_MSG_RESULT($has_option) unset has_option unset SAVE_CFLAGS done unset option if test "x$set_more_warnings" = xerror; then CFLAGS="$CFLAGS -Werror" fi else AC_MSG_RESULT(no) fi ]) network-manager-iodine-0.0.5/network-manager-iodine.doap000066400000000000000000000016621241646210600233040ustar00rootroot00000000000000 network-manager-iodine Iodine support for NetworkManager Guido Günther guidog network-manager-iodine-0.0.5/nm-iodine-service.conf000066400000000000000000000007501241646210600222520ustar00rootroot00000000000000 network-manager-iodine-0.0.5/nm-iodine-service.name.in000066400000000000000000000003371241646210600226530ustar00rootroot00000000000000[VPN Connection] name=iodine service=org.freedesktop.NetworkManager.iodine program=@LIBEXECDIR@/nm-iodine-service [GNOME] auth-dialog=nm-iodine-auth-dialog properties=libnm-iodine-properties supports-external-ui-mode=true network-manager-iodine-0.0.5/po/000077500000000000000000000000001241646210600165025ustar00rootroot00000000000000network-manager-iodine-0.0.5/po/LINGUAS000066400000000000000000000001471241646210600175310ustar00rootroot00000000000000# please keep this list sorted alphabetically cs de el es hu id it ja lv lt pa pl pt_BR sl sr sr@latin network-manager-iodine-0.0.5/po/POTFILES.in000066400000000000000000000003351241646210600202600ustar00rootroot00000000000000# List of source files containing translatable strings. # Please keep this file sorted alphabetically. auth-dialog/main.c properties/nm-iodine.c [type: gettext/glade]properties/nm-iodine-dialog.ui src/nm-iodine-service.c network-manager-iodine-0.0.5/po/cs.po000066400000000000000000000073671241646210600174640ustar00rootroot00000000000000# Czech translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Marek Černocký , 2013. # Zdeněk Hataš , 2013, 2014. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2014-03-09 11:07+0000\n" "PO-Revision-Date: 2014-03-09 15:59+0100\n" "Last-Translator: Zdeněk Hataš \n" "Language-Team: čeština \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Generator: Poedit 1.5.4\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Abyste měli přístup do virtuální soukromé sítě „%s“, musíte být ověřeni." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Ověření VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Heslo:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Heslo:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Zrušit" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_Budiž" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Z_obrazovat hesla" #: ../auth-dialog/vpn-password-dialog.c:248 msgid "dialog-password" msgstr "dialog-password" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Tunel skrz DNS Iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tunelované spojení skrz DNS" #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Uloženo" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Vždy se ptát" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Obecné" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "Doména ne_jvyšší úrovně:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Volitelné" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "Jme_nný server:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Velikost _fragmentu:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Zobrazit heslo" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "neplatná vlastnost „%s“ typu celé číslo nebo je mimo rozsah [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "neplatná vlastnost „%s“ typu pravdivostní hodnota (není ano nebo ne)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "neobsluhovaná vlastnost „%s“ typu %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "vlastnost „%s“ je neplatná nebo není podporována" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Volby VPN nejsou vůbec nastavené." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Schází utajované údaje pro VPN!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Nelze najít soubor s programem iodine."network-manager-iodine-0.0.5/po/de.po000066400000000000000000000066701241646210600174430ustar00rootroot00000000000000# German translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Christian Kirbach , 2013. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-05-11 15:04+0000\n" "PO-Revision-Date: 2013-06-04 16:44+0100\n" "Last-Translator: Christian Kirbach \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.5.5\n" #: ../auth-dialog/main.c:152 #, fuzzy, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Sie müssen sich für den Zugriff auf das virtuelle private Netz %s " "legitimieren." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 #, fuzzy msgid "Authenticate VPN" msgstr "Für VPN authentifizieren" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Passwort:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Passwort:" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Passwörter _zeigen" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Iodine DNS-Tunnel" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tunnelverbindung via DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Gespeichert" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Immer nachfragen" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Allgemein" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Oberste Domäne:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Optional" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Fragmentgröße:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Passwort zeigen" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "" "Ungültige Ganzzahl-Eigenschaft »%s« oder außerhalb des Bereichs [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "Ungültige boolesche Eigenschaft »%s« (nicht »yes« oder »no«)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "Unbehandelte Eigenschaft »%s« des Typs %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "Eigenschaft »%s« ist ungültig oder wird nicht unterstützt" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Keine VPN-Konfigurationsoptionen." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Keine VPN-Geheimnisse!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "iodine-Binärdatei konnte nicht gefunden werden." network-manager-iodine-0.0.5/po/el.po000066400000000000000000000102001241646210600174330ustar00rootroot00000000000000# Greek translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Dimitris Spingos , 2013. # Dimitris Spingos (Δημήτρης Σπίγγος) , 2013. msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2014-03-09 20:36+0000\n" "PO-Revision-Date: 2014-04-24 19:48+0200\n" "Last-Translator: Tom Tryfonidis \n" "Language-Team: team@gnome.gr\n" "Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.6.4\n" "X-Project-Style: gnome\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Χρειάζεστε πιστοποίηση για να αποκτήσετε πρόσβαση στο ιδιωτικό εικονικό " "δίκτυο (VPN) '%s'." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Πιστοποίηση VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Κωδικός πρόσβασης:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Κωδικός πρόσβασης:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "Ακύ_ρωση" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_Εντάξει" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Εμ_φάνιση κωδικών πρόσβασης" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Διοχέτευση DNS Iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Συνδέσεις διοχέτευσης μέσα από DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Αποθηκευμένο" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Να γίνεται πάντα ερώτηση" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Γενικά" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "Τομέας _κορυφαίου επιπέδου:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Προαιρετικό" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "Ό_νομα διακομιστή:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Μέγεθος απο_κόμματος:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Εμφάνιση κωδικού πρόσβασης" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "άκυρη ιδιότητα ακεραίου '%s' ή εκτός πεδίου τιμών [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "άκυρη ιδιότητα τιμής Μπουλ '%s' (ούτε ναι ούτε όχι)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "ανεπίλυτη ιδιότητα '%s' τύπου %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "άκυρη ή ανυποστήρικτη ιδιότητα '%s'" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Χωρίς επιλογές διαμόρφωσης VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Δεν υπάρχουν μυστικά VPN!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Αδύνατη η εύρεση δυαδικού iodine." network-manager-iodine-0.0.5/po/es.po000066400000000000000000000073311241646210600174550ustar00rootroot00000000000000# Spanish translation for network-manager-iodine. # Copyright (C) 2012 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # FIRST AUTHOR , YEAR. # Daniel Mustieles , 2012, 2013. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-11-03 21:20+0000\n" "PO-Revision-Date: 2013-11-20 13:47+0100\n" "Last-Translator: Daniel Mustieles \n" "Language-Team: Español \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" "X-Generator: Gtranslator 2.91.5\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "Debe autenticarse para acceder a la red privada virtual «%s»." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Autenticar VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Contraseña:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "C_ontraseña:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Cancelar" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_Aceptar" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "M_ostrar contraseñas" #: ../auth-dialog/vpn-password-dialog.c:248 #| msgid "Show password" msgid "dialog-password" msgstr "diálogo de contraseña" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Túnel DNS iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Conexiones de túnel mediante DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Guardado" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Preguntar siempre" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "General" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Reino de nivel superior:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Opcional" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Servidor de nombres:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Tamaño del _fragmento:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Mostrar contraseña" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "propiedad «%s» entera no válida o fuera de rango [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "propiedad «%s» booleana no válida (no es «sí» o «no»)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "propiedad «%s» de tipo %s sin manejar" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "propiedad «%s» no válida o no soportada" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "No hay opciones de configuración de VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "No hay secretos VPN." #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "No se pudo encontrar el binario de iodine." network-manager-iodine-0.0.5/po/hu.po000066400000000000000000000071561241646210600174670ustar00rootroot00000000000000# Hungarian translation of network-manager-iodine # Copyright (C) 2013. Free Software Foundation, Inc. # This file is distributed under the same license as the network-manager-iodine package. # # Gabor Kelemen , 2013. # Balázs Úr , 2014. msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2014-03-09 20:36+0000\n" "PO-Revision-Date: 2014-03-20 18:08+0100\n" "Last-Translator: Balázs Úr \n" "Language-Team: Hungarian \n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 1.2\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "Azonosítania kell magát a(z) „%s” virtuális magánhálózat eléréséhez." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "VPN azonosítás" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Jelszó:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Jelszó:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Mégse" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_OK" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "_Jelszavak megjelenítése" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Iodine DNS alagút" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Kapcsolatok alagutazása DNS-en keresztül" #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Mentett" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Mindig kérdezzen" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Általános" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "Felső szintű tartomány:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Elhagyható" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Névkiszolgáló:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Darabméret:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Jelszó megjelenítése" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "" "érvénytelen, vagy a(z) %2$d…%3$d tartományon kívüli egész érték: „%1$s”" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "érvénytelen logikai érték: „%s” (érvényes értékek: yes, no)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "kezeletlen %2$s típusú érték: „%1$s”" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "érvénytelen vagy nem támogatott érték: „%s”" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Nincsenek VPN-beállítások." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Nincs VPN-titok!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Nem található az iodine program." network-manager-iodine-0.0.5/po/id.po000066400000000000000000000066131241646210600174440ustar00rootroot00000000000000# Indonesian translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Andika Triwidada , 2013, 2014. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2014-03-09 20:36+0000\n" "PO-Revision-Date: 2014-03-30 10:37+0700\n" "Last-Translator: Andika Triwidada \n" "Language-Team: Indonesian \n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.7\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "Anda perlu otentikasi untuk mengakses Virtual Private Network '%s'." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Otentikasi VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Sandi:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Sandi:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Batal" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_Ok" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Ta_mpilkan sandi" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Tunnel DNS Iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Menembuskan koneksi melalui DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Disimpan" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Selalu tanya" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Umum" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "Domain Aras Punca_k:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Opsional" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Nameserver:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Ukuran _Fragmen:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Tampilkan sandi" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "properti integer '%s' tak valid atau di luar jangkauan [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "properti bool '%s' tak valid (bukan yes atau no)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "properti '%s' tak ditangani bertipe %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "properti '%s' tak valid atau tak didukung" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Tak ada opsi konfigurasi VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Tak ada rahasia VPN!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Tak bisa temukan biner iodine." network-manager-iodine-0.0.5/po/it.po000066400000000000000000000072141241646210600174620ustar00rootroot00000000000000# Italian translations for network-manager-iodine package # Copyright (C) 2012, 2013, 2014 the network-manager-iodine copyright holder # This file is distributed under the same license as the network-manager-iodine package. # Milo Casagrande , 2012, 2013, 2014. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-12-19 15:55+0000\n" "PO-Revision-Date: 2014-02-16 17:26+0100\n" "Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" "X-Generator: Poedit 1.6.4\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "È necessario autenticarsi per accedere alla Rete Privata Virtuale (VPN) «%s»." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Autenticazione VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Password:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "Pass_word:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "A_nnulla" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_OK" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "M_ostra le password" #: ../auth-dialog/vpn-password-dialog.c:248 #| msgid "Show password" msgid "dialog-password" msgstr "dialog-password" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Tunnel DNS iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tunnel per connessioni via DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Salvata" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Chiedere ogni volta" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Generale" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Dominio principale:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Opzionale" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Nameserver:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Dimen_sione frammento:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Mostra password" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "Proprietà intera «%s» non valida o fuori intervallo [%d → %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "Proprietà booleana «%s» non valida (non yes o no)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "Proprietà «%s» di tipo %s non gestita" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "Proprietà «%s» non valida o non supportata" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Nessuna opzione di configurazione VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Nessun segreto VPN." #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Impossibile trovare il file binario iodine." network-manager-iodine-0.0.5/po/ja.po000066400000000000000000000076501241646210600174440ustar00rootroot00000000000000# Japanese translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Hajime Taira , 2013. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-11-03 21:20+0000\n" "PO-Revision-Date: 2013-10-03 14:08+0900\n" "Last-Translator: Hajime Taira \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "仮想プライベートネットワーク '%s' にアクセスするには認証が必要です。" #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "VPN 認証" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "パスワード:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "パスワード(_P):" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "キャンセル(_C)" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "OK(_O)" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "パスワードを表示します。(_O)" #: ../auth-dialog/vpn-password-dialog.c:248 #, fuzzy #| msgid "Show password" msgid "dialog-password" msgstr "パスワードを表示します。" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Iodine DNS トンネリング" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "DNS 経由のトンネリング接続" #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "保存しました" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "毎回求める" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "全般" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "トップレベルドメイン(_T):" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "任意" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "ネームサーバー(_N):" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "フラグメントサイズ(_F):" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "パスワードを表示します。" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "数値型プロパティ '%s' が無効な数値か、もしくは設定値が範囲外です。[%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "ブーリアン型プロパティ '%s' が無効な値です。(値はyes、noではありません)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "プロパティ '%s' の型 (%s) を処理できません。" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "プロパティ '%s' は無効かサポートされていません。" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "VPN 構成オプションがありません。" #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "VPN シークレットがありません。" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "iodine のバイナリが見つかりません" network-manager-iodine-0.0.5/po/lt.po000066400000000000000000000073441241646210600174710ustar00rootroot00000000000000# Lithuanian translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Aurimas Černius , 2013, 2014. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-12-19 15:55+0000\n" "PO-Revision-Date: 2014-03-02 22:48+0200\n" "Last-Translator: Aurimas Černius \n" "Language-Team: Lietuvių \n" "Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Gtranslator 2.91.6\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Jums reikia patvirtinti tapatybę Virtualiam Privačiam Tinklui „%s“ pasiekti." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Patvirtinti VPN tapatybę" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Slaptažodis:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "Sla_ptažodis:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Atsisakyti" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_Gerai" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "R_odyti slaptažodžius" #: ../auth-dialog/vpn-password-dialog.c:248 #| msgid "Show password" msgid "dialog-password" msgstr "dialog-password" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Iodine DNS tunelis" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tunelio ryšiai per DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Įrašyta" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Visada klausti" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Bendra" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Aukščiausio lygio domenas:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Papildoma" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Vardų serveris:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Fragmento dydis:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Rodyti slaptažodį" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "netinkama sveiko skaičiaus savybė „%s“ arba už ribų [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "netinkama loginė savybė „%s“ (ne taip arba ne)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "neapdorotas savybės „%s“ tipas %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "savybė „%s“ netinkama arba nepalaikoma" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Nėra VPN konfigūracijos parametrų." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Nėra VPN paslapčių!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Nepavyko rasti iodine programos." network-manager-iodine-0.0.5/po/lv.po000066400000000000000000000065301241646210600174670ustar00rootroot00000000000000# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Rūdolfs Mazurs , 2013. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-03-03 02:04+0000\n" "PO-Revision-Date: 2013-04-21 23:30+0300\n" "Last-Translator: Rūdolfs Mazurs \n" "Language-Team: Latvian \n" "Language: lv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " "2);\n" "X-Generator: Lokalize 1.4\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Jums ir jāautentificējas, lai piekļūtu virtuālajiem privātajiem tīkliem “%s”." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Autentificēt VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Parole:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Parole:" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Rādīt par_oles" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Iodine DNS tunelis" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tuneļa savienojums caur DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Saglabāts" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Vienmēr jautāt" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Vispārīgi" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Augšējā līmeņa domēns:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Neobligāts" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Nosaukumu serveris:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Fragmentu izmērs:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Rādīt paroli" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "nederīga veselā skaitļa īpašība “%s” vai ārpus apgabala [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "nederīga būla īpašība “%s” (nav jā vai nē)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "neapstrādāts īpašības “%s” tips %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "īpašība “%s” nederīga vai nav atbalstīta" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Nav VPN konfigurācijas opciju." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Nav VPN noslēpumu!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Nevarēja atrast iodine bināro datni." network-manager-iodine-0.0.5/po/pa.po000066400000000000000000000072661241646210600174550ustar00rootroot00000000000000# Punjabi translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # # A S Alam , 2013. msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-01-27 22:17+0000\n" "PO-Revision-Date: 2013-03-03 07:33+0530\n" "Last-Translator: A S Alam \n" "Language-Team: Punjabi/Panjabi \n" "Language: pa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 1.5\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "ਤੁਹਾਨੂੰ ਵੁਰਚੁਅਲ ਪ੍ਰਾਈਵੇਟ ਨੈੱਟਵਰਕ '%s' ਅਸੈੱਸ ਕਰਨ ਲਈ ਪਰਮਾਣਿਤ ਹੋਣ ਦੀ ਲੋੜ ਹੈ।" #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "ਪਰਮਾਣਿਤ VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "ਪਾਸਵਰਡ:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "ਪਾਸਵਰਡ(_P):" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "ਪਾਸਵਰਡ ਵੇਖੋ(_o)" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "ਆਇਓਡੀਨ DNS ਟਨਲ" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "" #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "ਸੰਭਾਲਿਆ" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "ਹਮੇਸ਼ਾ ਪੁੱਛੋ" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "ਆਮ" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "ਚੋਣਵਾਂ" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "ਪਾਸਵਰਡ ਵੇਖੋ" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "ਗਲਤ ਪੂਰਨ-ਅੰਕ ਵਿਸ਼ੇਸ਼ਤਾ '%s' ਜਾਂ [%d -> %d] ਹੱਦ ਤੋਂ ਬਾਹਰ" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "ਗਲਤ ਬੁਲੀਅਨ ਵਿਸ਼ੇਸ਼ਤਾ '%s' (ਹਾਂ ਜਾਂ ਨਹੀਂ ਨਹੀਂ)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "ਨਾ-ਹੈਂਡਲ ਵਿਸ਼ੇਸ਼ਤਾ '%s' ਕਿਸਮ %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "ਵਿਸ਼ੇਸ਼ਤਾ '%s' ਗਲਤ ਹੈ ਜਾਂ ਸਹਾਇਕ ਨਹੀਂ ਹੈ" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "ਕੋਈ VPN ਸੰਰਚਨਾ ਚੋਣਾਂ ਨਹੀਂ।" #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "ਕੋਈ VPN ਭੇਦ ਨਹੀਂ!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "" network-manager-iodine-0.0.5/po/pl.po000066400000000000000000000074321241646210600174630ustar00rootroot00000000000000# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Aviary.pl # Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz # pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas: # gnomepl@aviary.pl # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Piotr Drąg , 2012-2013. # Aviary.pl , 2012-2013. msgid "" msgstr "" "Project-Id-Version: network-manager-iodine\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-11-07 00:20+0100\n" "PO-Revision-Date: 2013-11-07 00:21+0100\n" "Last-Translator: Piotr Drąg \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" "X-Poedit-Language: Polish\n" "X-Poedit-Country: Poland\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Aby uzyskać dostęp do wirtualnej sieci prywatnej \"%s\", należy się " "uwierzytelnić." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Uwierzytelnianie VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Hasło:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Hasło:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Anuluj" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_OK" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Wyświ_etlanie haseł" #: ../auth-dialog/vpn-password-dialog.c:248 msgid "dialog-password" msgstr "Okno dialogowe hasła" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Tunel DNS Iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Połączenia tunelowe przez DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Zapisane" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Pytanie za każdym razem" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Ogólne" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Domena najwyższego poziomu:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Opcjonalne" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "Serwer _nazw:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Rozmiar fragmentu:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Wyświetlanie hasła" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "" "nieprawidłowa własność liczby całkowitej \"%s\" lub jest poza zakresem [%d -" "> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "" "nieprawidłowa własność zmiennej logicznej \"%s\" (nie wynosi \"yes\" lub \"no" "\")" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "nieobsługiwana własność \"%s\" typu \"%s\"" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "własność \"%s\" jest nieprawidłowa lub nieobsługiwana" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Brak opcji konfiguracji VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Brak haseł VPN." #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Nie można odnaleźć pliku binarnego iodine." network-manager-iodine-0.0.5/po/pt_BR.po000066400000000000000000000072131241646210600200530ustar00rootroot00000000000000# Brazilian Portuguese translation for network-manager-iodine. # Copyright (C) 2012 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Rafael Ferreira , 2012. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-11-03 21:20+0000\n" "PO-Revision-Date: 2013-11-04 10:33-0300\n" "Last-Translator: Antonio Fernandes C. Neto \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 1.5.7\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "Você precisa autenticar para acessar a VPN \"%s\"." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Autenticar a VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Senha:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Senha:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Cancelar" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_Ok" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "_Mostrar senhas" #: ../auth-dialog/vpn-password-dialog.c:248 msgid "dialog-password" msgstr "diálogo-senha" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Túnel de DNS Iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Conexões em túnel via DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Salvo" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Sempre perguntar" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Geral" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Domínio de nível principal:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Opcional" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Nome do servidor:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Tamanho de _fragmento:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Mostra senha" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "propriedade de inteiro inválida \"%s\" ou fora dos limites [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "propriedade de booleano inválida \"%s\" (não \"sim\" ou \"não\")" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "propriedade sem tratamento \"%s\" tipo %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "propriedade \"%s\" inválida ou sem suporte" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Nenhuma opção de configuração de VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Nenhum segredo de VPN!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Não foi possível encontrar o binário do iodine." network-manager-iodine-0.0.5/po/sl.po000066400000000000000000000072321241646210600174640ustar00rootroot00000000000000# Slovenian translation for network-manager-iodine. # Copyright (C) 2012 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # # Matej Urbančič , 2012-2013. # msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-12-19 15:55+0000\n" "PO-Revision-Date: 2013-12-22 19:16+0100\n" "Last-Translator: Matej Urbančič \n" "Language-Team: Slovenian GNOME Translation Team \n" "Language: sl_SI\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" "X-Poedit-SourceCharset: utf-8\n" "X-Generator: Poedit 1.5.4\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "Za dostop do navideznega zasebnega omrežja '%s' je zahtevana overitev." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Overi VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Geslo:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Geslo:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Prekliči" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_V redu" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Pokaži _gesla" #: ../auth-dialog/vpn-password-dialog.c:248 msgid "dialog-password" msgstr "geslo" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Tuneliranje DNS Iodine" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tuneliranje povezave preko DNS." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Shranjeno" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Vedno vprašaj" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Splošno" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Vrhnja domena:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Izbirno" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Imenski strežnik:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "Velikost _delca:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Pokaži geslo" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "neveljavna logična lastnost '%s' obsega [%d -> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "neveljavna logična lastnost '%s' (ni da ali ne)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "neupravljana lastnost '%s' vrste %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "lastnost '%s' je neveljavna ali pa ni podprta" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Ni možnosti nastavitev VPN." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Ni gesel za VPN!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Ni mogoče najti dvojiške datoteke iodine." network-manager-iodine-0.0.5/po/sr.po000066400000000000000000000103211241646210600174630ustar00rootroot00000000000000# Serbian translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Мирослав Николић , 2013, 2014. msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product" "=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-12-19 15:55+0000\n" "PO-Revision-Date: 2014-01-27 22:49+0200\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : " "n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Project-Style: gnome\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Морате да потврдите идентитет да бисте могли да приступите виртуелној " "приватној мрежи „%s“." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Потврди ВПН" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Лозинка:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Лозинка:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Откажи" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_У реду" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Прикажи _лозинке" #: ../auth-dialog/vpn-password-dialog.c:248 #| msgid "Show password" msgid "dialog-password" msgstr "прозорче лозинке" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Јодине ДНС тунел" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Тунелске везе путем ДНС-а." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Сачувано" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Питај увек" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Опште" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Домен највишег нивоа:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Необавезно" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Сервер назива:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Величина одломка:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Прикажи лозинку" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "неисправно својство целог броја „%s“ или је ван опсега [%d —> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "неисправно логичко својство „%s“ (није „да“ или „не“)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "неруковано својство „%s“ врсте %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "својство „%s“ је неисправно или није подржано" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Нема опција за ВПН подешавање." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Нема ВПН тајни!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Не могу да пронађем јодине извршни." network-manager-iodine-0.0.5/po/sr@latin.po000066400000000000000000000073621241646210600206260ustar00rootroot00000000000000# Serbian translation for network-manager-iodine. # Copyright (C) 2013 network-manager-iodine's COPYRIGHT HOLDER # This file is distributed under the same license as the network-manager-iodine package. # Miroslav Nikolić , 2013, 2014. msgid "" msgstr "" "Project-Id-Version: network-manager-iodine master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product" "=network-manager-iodine&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2013-12-19 15:55+0000\n" "PO-Revision-Date: 2014-01-27 22:49+0200\n" "Last-Translator: Miroslav Nikolić \n" "Language-Team: Serbian \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : " "n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Project-Style: gnome\n" #: ../auth-dialog/main.c:152 #, c-format msgid "You need to authenticate to access the Virtual Private Network '%s'." msgstr "" "Morate da potvrdite identitet da biste mogli da pristupite virtuelnoj " "privatnoj mreži „%s“." #. Otherwise, we have no saved password, or the password flags indicated #. * that the password should never be saved. #. #: ../auth-dialog/main.c:165 ../auth-dialog/main.c:188 msgid "Authenticate VPN" msgstr "Potvrdi VPN" #: ../auth-dialog/main.c:168 msgid "Password:" msgstr "Lozinka:" #: ../auth-dialog/vpn-password-dialog.c:90 #: ../properties/nm-iodine-dialog.ui.h:7 msgid "_Password:" msgstr "_Lozinka:" #: ../auth-dialog/vpn-password-dialog.c:187 msgid "_Cancel" msgstr "_Otkaži" #: ../auth-dialog/vpn-password-dialog.c:188 msgid "_Ok" msgstr "_U redu" #: ../auth-dialog/vpn-password-dialog.c:223 msgid "Sh_ow passwords" msgstr "Prikaži _lozinke" #: ../auth-dialog/vpn-password-dialog.c:248 #| msgid "Show password" msgid "dialog-password" msgstr "prozorče lozinke" #: ../properties/nm-iodine.c:46 msgid "Iodine DNS Tunnel" msgstr "Jodine DNS tunel" #: ../properties/nm-iodine.c:47 msgid "Tunnel connections via DNS." msgstr "Tunelske veze putem DNS-a." #: ../properties/nm-iodine-dialog.ui.h:1 msgid "Saved" msgstr "Sačuvano" #: ../properties/nm-iodine-dialog.ui.h:2 msgid "Always ask" msgstr "Pitaj uvek" #: ../properties/nm-iodine-dialog.ui.h:3 msgid "General" msgstr "Opšte" #: ../properties/nm-iodine-dialog.ui.h:4 msgid "_Toplevel Domain:" msgstr "_Domen najvišeg nivoa:" #: ../properties/nm-iodine-dialog.ui.h:5 msgid "Optional" msgstr "Neobavezno" #: ../properties/nm-iodine-dialog.ui.h:6 msgid "_Nameserver:" msgstr "_Server naziva:" #: ../properties/nm-iodine-dialog.ui.h:8 msgid "_Fragment Size:" msgstr "_Veličina odlomka:" #: ../properties/nm-iodine-dialog.ui.h:9 msgid "Show password" msgstr "Prikaži lozinku" #: ../src/nm-iodine-service.c:131 #, c-format msgid "invalid integer property '%s' or out of range [%d -> %d]" msgstr "neispravno svojstvo celog broja „%s“ ili je van opsega [%d —> %d]" #: ../src/nm-iodine-service.c:142 #, c-format msgid "invalid boolean property '%s' (not yes or no)" msgstr "neispravno logičko svojstvo „%s“ (nije „da“ ili „ne“)" #: ../src/nm-iodine-service.c:149 #, c-format msgid "unhandled property '%s' type %s" msgstr "nerukovano svojstvo „%s“ vrste %s" #: ../src/nm-iodine-service.c:163 #, c-format msgid "property '%s' invalid or not supported" msgstr "svojstvo „%s“ je neispravno ili nije podržano" #: ../src/nm-iodine-service.c:179 msgid "No VPN configuration options." msgstr "Nema opcija za VPN podešavanje." #: ../src/nm-iodine-service.c:198 msgid "No VPN secrets!" msgstr "Nema VPN tajni!" #: ../src/nm-iodine-service.c:483 msgid "Could not find iodine binary." msgstr "Ne mogu da pronađem jodine izvršni." network-manager-iodine-0.0.5/properties/000077500000000000000000000000001241646210600202605ustar00rootroot00000000000000network-manager-iodine-0.0.5/properties/Makefile.am000066400000000000000000000020701241646210600223130ustar00rootroot00000000000000plugindir = $(libdir)/NetworkManager plugin_LTLIBRARIES = libnm-iodine-properties.la libnm_iodine_properties_la_SOURCES = \ nm-iodine.c \ nm-iodine.h uidir = $(datadir)/gnome-vpn-properties/iodine ui_DATA = nm-iodine-dialog.ui libnm_iodine_properties_la_CFLAGS = \ $(GTK_CFLAGS) \ $(GCONF_CFLAGS) \ $(NM_CFLAGS) \ -DICONDIR=\""$(datadir)/pixmaps"\" \ -DUIDIR=\""$(uidir)"\" \ -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ -DGNOME_DISABLE_DEPRECATED \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DVERSION=\"$(VERSION)\" libnm_iodine_properties_la_LIBADD = \ $(GTK_LIBS) \ $(GCONF_LIBS) \ $(NM_LIBS) libnm_iodine_properties_la_LDFLAGS = \ -avoid-version CLEANFILES = *.bak *~ EXTRA_DIST = \ $(ui_DATA) network-manager-iodine-0.0.5/properties/nm-iodine-dialog.ui000066400000000000000000000313421241646210600237360ustar00rootroot00000000000000 Saved Always ask True False 12 16 True False 6 True False 0 General False False 0 True False 12 True False 2 6 6 True False 1 0 True True True 1 2 True False 0 _Toplevel Domain: True topdomain_entry True True 1 False True 0 True False vertical True False 0 Optional False False 0 True False 12 True False 6 6 True False 0 _Nameserver: True nameserver_entry 0 0 1 1 True False 0 _Password: True password_entry 0 1 1 1 True True False True 1 1 1 1 True False 0 _Fragment Size: True fragsize_entry 0 3 1 1 True True True 1 3 1 1 True True True 1 0 1 1 Show password False True True False False 0 True 1 2 1 1 True False pass_type_model 0 2 1 1 1 False True 1 True True 1 network-manager-iodine-0.0.5/properties/nm-iodine.c000066400000000000000000000525151241646210600223130ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * GNOME UI dialogs for configuring iodine VPN connections * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright © 2012 Guido Günther * * Based on network-manager-{openconnect,pptp} */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #define NM_VPN_API_SUBJECT_TO_CHANGE #include #include #include #include #include "../src/nm-iodine-service.h" #include "nm-iodine.h" #define IODINE_PLUGIN_NAME _("Iodine DNS Tunnel") #define IODINE_PLUGIN_DESC _("Tunnel connections via DNS.") #define IODINE_PLUGIN_SERVICE NM_DBUS_SERVICE_IODINE #define PW_TYPE_SAVE 0 #define PW_TYPE_ASK 1 #define PW_TYPE_UNUSED 2 /************** plugin class **************/ static void iodine_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class); G_DEFINE_TYPE_EXTENDED (IodinePluginUi, iodine_plugin_ui, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_INTERFACE, iodine_plugin_ui_interface_init)) /************** UI widget class **************/ static void iodine_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class); G_DEFINE_TYPE_EXTENDED (IodinePluginUiWidget, iodine_plugin_ui_widget,G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE, iodine_plugin_ui_widget_interface_init)) #define IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IODINE_TYPE_PLUGIN_UI_WIDGET, IodinePluginUiWidgetPrivate)) typedef struct { GtkBuilder *builder; GtkWidget *widget; GtkSizeGroup *group; gboolean window_added; } IodinePluginUiWidgetPrivate; static NMConnection * import (NMVpnPluginUiInterface *iface, const char *path, GError **error) { NMConnection *connection; NMSettingConnection *s_con; NMSettingVPN *s_vpn; NMSettingIP4Config *s_ip4; GKeyFile *keyfile; GKeyFileFlags flags; const char *buf; keyfile = g_key_file_new (); flags = G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS; if (!g_key_file_load_from_file (keyfile, path, flags, error)) { g_set_error (error, 0, 0, "does not look like a %s VPN connection (parse failed)", IODINE_PLUGIN_NAME); return NULL; } connection = nm_connection_new (); s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ()); nm_connection_add_setting (connection, NM_SETTING (s_con)); s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ()); g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_IODINE, NULL); nm_connection_add_setting (connection, NM_SETTING (s_vpn)); s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ()); nm_connection_add_setting (connection, NM_SETTING (s_ip4)); /* top level domain */ buf = g_key_file_get_string (keyfile, "iodine", "topdomain", NULL); if (buf) { nm_setting_vpn_add_data_item (s_vpn, NM_IODINE_KEY_TOPDOMAIN, buf); } else { g_set_error (error, 0, 0, "does not look like a %s VPN connection " "(no top level domain)", IODINE_PLUGIN_NAME); g_object_unref (connection); return NULL; } /* Optional Settings */ /* Description */ buf = g_key_file_get_string (keyfile, "iodine", "Description", NULL); if (buf) g_object_set (s_con, NM_SETTING_CONNECTION_ID, buf, NULL); /* Name server */ buf = g_key_file_get_string (keyfile, "iodine", "Nameserver", NULL); if (buf) nm_setting_vpn_add_data_item (s_vpn, NM_IODINE_KEY_NAMESERVER, buf); /* Fragment size */ buf = g_key_file_get_string (keyfile, "iodine", "Fragsize", NULL); if (buf) nm_setting_vpn_add_data_item (s_vpn, NM_IODINE_KEY_FRAGSIZE, "yes"); return connection; } static gboolean export (NMVpnPluginUiInterface *iface, const char *path, NMConnection *connection, GError **error) { NMSettingConnection *s_con; NMSettingVPN *s_vpn; const char *value; const char *topdomain = NULL; const char *nameserver = NULL; const char *fragsize = NULL; gboolean success = FALSE; FILE *f; f = fopen (path, "w"); if (!f) { g_set_error (error, 0, 0, "could not open file for writing"); return FALSE; } s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN); value = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_TOPDOMAIN); if (value && strlen (value)) topdomain = value; else { g_set_error (error, 0, 0, "connection was incomplete (missing top level domain)"); goto done; } value = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_NAMESERVER); if (value && strlen (value)) nameserver = value; value = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_FRAGSIZE); if (value && strlen (value)) fragsize = value; fprintf (f, "[iodine]\n" "Description=%s\n" "Topdomain=%s\n" "Nameserver=%s\n" "Fragsize=%s\n", /* Description */ nm_setting_connection_get_id (s_con), /* Topdomain */ topdomain, /* Nameserver */ nameserver, /* Fragsize */ fragsize); success = TRUE; done: fclose (f); return success; } GQuark iodine_plugin_ui_error_quark (void) { static GQuark error_quark = 0; if (G_UNLIKELY (error_quark == 0)) error_quark = g_quark_from_static_string ("iodine-plugin-ui-error-quark"); return error_quark; } /* This should really be standard. */ #define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC } GType iodine_plugin_ui_error_get_type (void) { static GType etype = 0; if (etype == 0) { static const GEnumValue values[] = { /* Unknown error. */ ENUM_ENTRY (IODINE_PLUGIN_UI_ERROR_UNKNOWN, "UnknownError"), /* The specified property was invalid. */ ENUM_ENTRY (IODINE_PLUGIN_UI_ERROR_INVALID_PROPERTY, "InvalidProperty"), /* The specified property was missing and is required. */ ENUM_ENTRY (IODINE_PLUGIN_UI_ERROR_MISSING_PROPERTY, "MissingProperty"), { 0, 0, 0 } }; etype = g_enum_register_static ("IodinePluginUiError", values); } return etype; } static gboolean check_validity (IodinePluginUiWidget *self, GError **error) { IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); GtkWidget *widget; const char *str; widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "topdomain_entry")); str = gtk_entry_get_text (GTK_ENTRY (widget)); if (!str || !strlen (str)) { g_set_error (error, IODINE_PLUGIN_UI_ERROR, IODINE_PLUGIN_UI_ERROR_INVALID_PROPERTY, NM_IODINE_KEY_TOPDOMAIN); return FALSE; } return TRUE; } static void stuff_changed_cb (GtkWidget *widget, gpointer user_data) { g_signal_emit_by_name (IODINE_PLUGIN_UI_WIDGET (user_data), "changed"); } static void setup_password_widget (IodinePluginUiWidget *self, const char *entry_name, NMSettingVPN *s_vpn, const char *secret_name) { IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); NMSettingSecretFlags secret_flags = NM_SETTING_SECRET_FLAG_NONE; GtkWidget *widget; const char *value; /* Default to agent-owned for new connections */ if (s_vpn == NULL) secret_flags = NM_SETTING_SECRET_FLAG_AGENT_OWNED; widget = (GtkWidget *) gtk_builder_get_object (priv->builder, entry_name); g_assert (widget); gtk_size_group_add_widget (priv->group, widget); if (s_vpn) { value = nm_setting_vpn_get_secret (s_vpn, secret_name); gtk_entry_set_text (GTK_ENTRY (widget), value ? value : ""); nm_setting_get_secret_flags (NM_SETTING (s_vpn), secret_name, &secret_flags, NULL); } secret_flags &= ~(NM_SETTING_SECRET_FLAG_NOT_SAVED | NM_SETTING_SECRET_FLAG_NOT_REQUIRED); g_object_set_data (G_OBJECT (widget), "flags", GUINT_TO_POINTER (secret_flags)); g_signal_connect (widget, "changed", G_CALLBACK (stuff_changed_cb), self); } static void show_toggled_cb (GtkCheckButton *button, IodinePluginUiWidget *self) { IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); GtkWidget *widget; gboolean visible; visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "password_entry")); g_assert (widget); gtk_entry_set_visibility (GTK_ENTRY (widget), visible); } static void pw_type_combo_changed_cb (GtkWidget *combo, gpointer user_data) { IodinePluginUiWidget *self = IODINE_PLUGIN_UI_WIDGET (user_data); IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); GtkWidget *entry; entry = GTK_WIDGET (gtk_builder_get_object (priv->builder, "password_entry")); g_assert (entry); /* If the user chose "Not required", desensitize and clear the correct * password entry. */ switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combo))) { case PW_TYPE_ASK: case PW_TYPE_UNUSED: gtk_entry_set_text (GTK_ENTRY (entry), ""); gtk_widget_set_sensitive (entry, FALSE); break; default: gtk_widget_set_sensitive (entry, TRUE); break; } stuff_changed_cb (combo, self); } static void init_one_pw_combo (IodinePluginUiWidget *self, NMSettingVPN *s_vpn, const char *combo_name, const char *secret_key, const char *entry_name) { IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); int active = -1; GtkWidget *widget; GtkListStore *store; const char *value = NULL; guint32 default_idx = 1; NMSettingSecretFlags pw_flags = NM_SETTING_SECRET_FLAG_NONE; /* If there's already a password and the password type can't be found in * the VPN settings, default to saving it. Otherwise, always ask for it. */ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, entry_name)); g_assert (widget); value = gtk_entry_get_text (GTK_ENTRY (widget)); if (value && strlen (value)) default_idx = 0; store = GTK_LIST_STORE(gtk_builder_get_object (priv->builder, "pass_type_model")); g_assert (store); if (s_vpn) nm_setting_get_secret_flags (NM_SETTING (s_vpn), secret_key, &pw_flags, NULL); if ((active < 0) && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED) && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) { active = PW_TYPE_SAVE; } if ((active < 0) && (pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED)) active = PW_TYPE_ASK; if ((active < 0) && (pw_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) active = PW_TYPE_UNUSED; widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, combo_name)); g_assert (widget); gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? default_idx : active); pw_type_combo_changed_cb (widget, self); g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (pw_type_combo_changed_cb), self); } static gboolean init_plugin_ui (IodinePluginUiWidget *self, NMConnection *connection, GError **error) { IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); NMSettingVPN *s_vpn; GtkWidget *widget; const char *value; s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN); priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "topdomain_entry")); if (!widget) return FALSE; gtk_size_group_add_widget (priv->group, widget); if (s_vpn) { value = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_TOPDOMAIN); if (value) gtk_entry_set_text (GTK_ENTRY (widget), value); } g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "nameserver_entry")); if (!widget) return FALSE; gtk_size_group_add_widget (priv->group, widget); if (s_vpn) { value = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_NAMESERVER); if (value) gtk_entry_set_text (GTK_ENTRY (widget), value); } g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "fragsize_entry")); if (!widget) return FALSE; if (s_vpn) { value = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_FRAGSIZE); if (value) gtk_entry_set_text (GTK_ENTRY (widget), value); } g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "show_passwords_checkbutton")); g_signal_connect (G_OBJECT (widget), "toggled", (GCallback) show_toggled_cb, self); setup_password_widget (self, "password_entry", s_vpn, NM_IODINE_KEY_PASSWORD); init_one_pw_combo (self, s_vpn, "pass_type_combo", NM_IODINE_KEY_PASSWORD, "password_entry"); return TRUE; } static GObject * get_widget (NMVpnPluginUiWidgetInterface *iface) { IodinePluginUiWidget *self = IODINE_PLUGIN_UI_WIDGET (iface); IodinePluginUiWidgetPrivate *priv = IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); return G_OBJECT (priv->widget); } static void save_password_and_flags (NMSettingVPN *s_vpn, GtkBuilder *builder, const char *entry_name, const char *combo_name, const char *secret_key) { NMSettingSecretFlags flags = NM_SETTING_SECRET_FLAG_NONE; const char *password; GtkWidget *entry; GtkWidget *combo; /* Grab original password flags */ entry = GTK_WIDGET (gtk_builder_get_object (builder, entry_name)); flags = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (entry), "flags")); /* And set new ones based on the type combo */ combo = GTK_WIDGET (gtk_builder_get_object (builder, combo_name)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combo))) { case PW_TYPE_SAVE: password = gtk_entry_get_text (GTK_ENTRY (entry)); if (password && strlen (password)) nm_setting_vpn_add_secret (s_vpn, secret_key, password); break; case PW_TYPE_UNUSED: flags |= NM_SETTING_SECRET_FLAG_NOT_REQUIRED; break; case PW_TYPE_ASK: default: flags |= NM_SETTING_SECRET_FLAG_NOT_SAVED; break; } /* Set new secret flags */ nm_setting_set_secret_flags (NM_SETTING (s_vpn), secret_key, flags, NULL); } static gboolean update_connection (NMVpnPluginUiWidgetInterface *iface, NMConnection *connection, GError **error) { IodinePluginUiWidget *self = IODINE_PLUGIN_UI_WIDGET (iface); IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (self); NMSettingVPN *s_vpn; GtkWidget *widget; char *str; if (!check_validity (self, error)) return FALSE; s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ()); g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_IODINE, NULL); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "topdomain_entry")); g_assert(widget); str = (char *) gtk_entry_get_text (GTK_ENTRY (widget)); if (str && strlen (str)) nm_setting_vpn_add_data_item (s_vpn, NM_IODINE_KEY_TOPDOMAIN, str); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "nameserver_entry")); g_assert(widget); str = (char *) gtk_entry_get_text (GTK_ENTRY (widget)); if (str && strlen (str)) nm_setting_vpn_add_data_item (s_vpn, NM_IODINE_KEY_NAMESERVER, str); widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "fragsize_entry")); g_assert(widget); str = (char *) gtk_entry_get_text (GTK_ENTRY (widget)); if (str && strlen (str)) nm_setting_vpn_add_data_item (s_vpn, NM_IODINE_KEY_FRAGSIZE, str); /* User password and flags */ save_password_and_flags (s_vpn, priv->builder, "password_entry", "pass_type_combo", NM_IODINE_KEY_PASSWORD); nm_connection_add_setting (connection, NM_SETTING (s_vpn)); return TRUE; } static NMVpnPluginUiWidgetInterface * nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error) { NMVpnPluginUiWidgetInterface *object; IodinePluginUiWidgetPrivate *priv; char *ui_file; if (error) g_return_val_if_fail (*error == NULL, NULL); object = NM_VPN_PLUGIN_UI_WIDGET_INTERFACE \ (g_object_new (IODINE_TYPE_PLUGIN_UI_WIDGET, NULL)); if (!object) { g_set_error (error, IODINE_PLUGIN_UI_ERROR, 0, "could not create iodine object"); return NULL; } priv = IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (object); ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-iodine-dialog.ui"); priv->builder = gtk_builder_new (); gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE); if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) { g_warning ("Couldn't load builder file: %s", error && *error ? (*error)->message : "(unknown)"); g_clear_error (error); g_set_error (error, IODINE_PLUGIN_UI_ERROR, 0, "could not load required resources at %s", ui_file); g_free (ui_file); g_object_unref (object); return NULL; } g_free (ui_file); priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "iodine-vbox")); if (!priv->widget) { g_set_error (error, IODINE_PLUGIN_UI_ERROR, 0, "could not load UI widget"); g_object_unref (object); return NULL; } g_object_ref_sink (priv->widget); if (!init_plugin_ui (IODINE_PLUGIN_UI_WIDGET (object), connection, error)) { g_object_unref (object); return NULL; } return object; } static void dispose (GObject *object) { IodinePluginUiWidget *plugin = IODINE_PLUGIN_UI_WIDGET (object); IodinePluginUiWidgetPrivate *priv = \ IODINE_PLUGIN_UI_WIDGET_GET_PRIVATE (plugin); if (priv->group) g_object_unref (priv->group); if (priv->widget) g_object_unref (priv->widget); if (priv->builder) g_object_unref (priv->builder); G_OBJECT_CLASS (iodine_plugin_ui_widget_parent_class)->dispose (object); } static void iodine_plugin_ui_widget_class_init (IodinePluginUiWidgetClass *req_class) { GObjectClass *object_class = G_OBJECT_CLASS (req_class); g_type_class_add_private (req_class, sizeof (IodinePluginUiWidgetPrivate)); object_class->dispose = dispose; } static void iodine_plugin_ui_widget_init (IodinePluginUiWidget *plugin) { } static void iodine_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class) { /* interface implementation */ iface_class->get_widget = get_widget; iface_class->update_connection = update_connection; } static guint32 get_capabilities (NMVpnPluginUiInterface *iface) { return (NM_VPN_PLUGIN_UI_CAPABILITY_IMPORT | NM_VPN_PLUGIN_UI_CAPABILITY_EXPORT); } static NMVpnPluginUiWidgetInterface * ui_factory (NMVpnPluginUiInterface *iface, NMConnection *connection, GError **error) { return nm_vpn_plugin_ui_widget_interface_new (connection, error); } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { switch (prop_id) { case NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME: g_value_set_string (value, IODINE_PLUGIN_NAME); break; case NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC: g_value_set_string (value, IODINE_PLUGIN_DESC); break; case NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE: g_value_set_string (value, IODINE_PLUGIN_SERVICE); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void iodine_plugin_ui_class_init (IodinePluginUiClass *req_class) { GObjectClass *object_class = G_OBJECT_CLASS (req_class); object_class->get_property = get_property; g_object_class_override_property (object_class, NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME, NM_VPN_PLUGIN_UI_INTERFACE_NAME); g_object_class_override_property (object_class, NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC, NM_VPN_PLUGIN_UI_INTERFACE_DESC); g_object_class_override_property (object_class, NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE, NM_VPN_PLUGIN_UI_INTERFACE_SERVICE); } static void iodine_plugin_ui_init (IodinePluginUi *plugin) { } static void iodine_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class) { /* interface implementation */ iface_class->ui_factory = ui_factory; iface_class->get_capabilities = get_capabilities; iface_class->import_from_file = import; iface_class->export_to_file = export; } G_MODULE_EXPORT NMVpnPluginUiInterface * nm_vpn_plugin_ui_factory (GError **error) { if (error) g_return_val_if_fail (*error == NULL, NULL); return NM_VPN_PLUGIN_UI_INTERFACE (g_object_new (IODINE_TYPE_PLUGIN_UI, NULL)); } network-manager-iodine-0.0.5/properties/nm-iodine.h000066400000000000000000000063601241646210600223150ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * GNOME UI dialogs for configuring iodine VPN connections * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright © 2012 Guido Günther */ #ifndef _NM_IODINE_H_ #define _NM_IODINE_H_ #include typedef enum { IODINE_PLUGIN_UI_ERROR_UNKNOWN = 0, IODINE_PLUGIN_UI_ERROR_INVALID_PROPERTY, IODINE_PLUGIN_UI_ERROR_MISSING_PROPERTY } IodinePluginUiError; GQuark iodine_plugin_ui_error_quark (void); #define IODINE_PLUGIN_UI_ERROR iodine_plugin_ui_error_quark () #define IODINE_TYPE_PLUGIN_UI_ERROR (iodine_plugin_ui_error_get_type ()) GType iodine_plugin_ui_error_get_type (void); #define IODINE_TYPE_PLUGIN_UI (iodine_plugin_ui_get_type ()) #define IODINE_PLUGIN_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IODINE_TYPE_PLUGIN_UI, IodinePluginUi)) #define IODINE_PLUGIN_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IODINE_TYPE_PLUGIN_UI, IodinePluginUiClass)) #define IODINE_IS_PLUGIN_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IODINE_TYPE_PLUGIN_UI)) #define IODINE_IS_PLUGIN_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), IODINE_TYPE_PLUGIN_UI)) #define IODINE_PLUGIN_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IODINE_TYPE_PLUGIN_UI, IodinePluginUiClass)) typedef struct _IodinePluginUi IodinePluginUi; typedef struct _IodinePluginUiClass IodinePluginUiClass; struct _IodinePluginUi { GObject parent; }; struct _IodinePluginUiClass { GObjectClass parent; }; GType iodine_plugin_ui_get_type (void); #define IODINE_TYPE_PLUGIN_UI_WIDGET (iodine_plugin_ui_widget_get_type ()) #define IODINE_PLUGIN_UI_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IODINE_TYPE_PLUGIN_UI_WIDGET, IodinePluginUiWidget)) #define IODINE_PLUGIN_UI_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IODINE_TYPE_PLUGIN_UI_WIDGET, IodinePluginUiWidgetClass)) #define IODINE_IS_PLUGIN_UI_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IODINE_TYPE_PLUGIN_UI_WIDGET)) #define IODINE_IS_PLUGIN_UI_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), IODINE_TYPE_PLUGIN_UI_WIDGET)) #define IODINE_PLUGIN_UI_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IODINE_TYPE_PLUGIN_UI_WIDGET, IodinePluginUiWidgetClass)) typedef struct _IodinePluginUiWidget IodinePluginUiWidget; typedef struct _IodinePluginUiWidgetClass IodinePluginUiWidgetClass; struct _IodinePluginUiWidget { GObject parent; }; struct _IodinePluginUiWidgetClass { GObjectClass parent; }; GType iodine_plugin_ui_widget_get_type (void); #endif /* _NM_IODINE_H_ */ network-manager-iodine-0.0.5/src/000077500000000000000000000000001241646210600166535ustar00rootroot00000000000000network-manager-iodine-0.0.5/src/Makefile.am000066400000000000000000000011141241646210600207040ustar00rootroot00000000000000INCLUDES = -I${top_srcdir} AM_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GTHREAD_CFLAGS) \ $(NM_CFLAGS) \ -DG_DISABLE_DEPRECATED \ -DBINDIR=\"$(bindir)\" \ -DPREFIX=\""$(prefix)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DVERSION="\"$(VERSION)\"" \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DLOCALSTATEDIR=\""$(localstatedir)"\" \ -DDATADIR=\"$(datadir)\" libexec_PROGRAMS = \ nm-iodine-service nm_iodine_service_SOURCES = \ nm-iodine-service.c \ nm-iodine-service.h nm_iodine_service_LDADD = \ $(DBUS_LIBS) \ $(GTHREAD_LIBS) \ $(NM_LIBS) CLEANFILES = *~ network-manager-iodine-0.0.5/src/nm-iodine-service.c000066400000000000000000000431241241646210600223400ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * NetworkManager iodine VPN connections * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright © 2012 Guido Günther * * Based on network-manager-{openconnect,pptp} */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "nm-iodine-service.h" #include "nm-utils.h" #define NM_IODINE_USER "nm-iodine" #define NM_IODINE_RUNDIR LOCALSTATEDIR "/run/" NM_IODINE_USER G_DEFINE_TYPE (NMIODINEPlugin, nm_iodine_plugin, NM_TYPE_VPN_PLUGIN) typedef struct { GPid pid; NMVPNPluginFailure failure; GHashTable *ip4config; } NMIODINEPluginPrivate; #define NM_IODINE_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_IODINE_PLUGIN, NMIODINEPluginPrivate)) static const char *iodine_binary_paths[] = { "/usr/bin/iodine", "/usr/sbin/iodine", "/usr/local/bin/iodine", "/usr/local/sbin/iodine", "/opt/bin/iodine", "/opt/sbin/iodine", NULL }; typedef struct { const char *name; GType type; gint int_min; gint int_max; } ValidProperty; static ValidProperty valid_properties[] = { { NM_IODINE_KEY_TOPDOMAIN, G_TYPE_STRING, 0, 0 }, { NM_IODINE_KEY_NAMESERVER, G_TYPE_STRING, 0, 0 }, { NM_IODINE_KEY_FRAGSIZE, G_TYPE_STRING, 0, 0 }, { NULL, G_TYPE_NONE, 0, 0 } }; static ValidProperty valid_secrets[] = { { NM_IODINE_KEY_PASSWORD, G_TYPE_STRING, 0, 0 }, { NULL, G_TYPE_NONE, 0, 0 } }; typedef struct ValidateInfo { ValidProperty *table; GError **error; gboolean have_items; } ValidateInfo; static void validate_one_property (const char *key, const char *value, gpointer user_data) { ValidateInfo *info = (ValidateInfo *) user_data; int i; if (*(info->error)) return; info->have_items = TRUE; /* 'name' is the setting name; always allowed but unused */ if (!strcmp (key, NM_SETTING_NAME)) return; for (i = 0; info->table[i].name; i++) { ValidProperty prop = info->table[i]; long int tmp; if (strcmp (prop.name, key)) continue; switch (prop.type) { case G_TYPE_STRING: return; /* valid */ case G_TYPE_INT: errno = 0; tmp = strtol (value, NULL, 10); if (errno == 0 && tmp >= prop.int_min && tmp <= prop.int_max) return; /* valid */ g_set_error (info->error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, _("invalid integer property '%s' or out of range " "[%d -> %d]"), key, prop.int_min, prop.int_max); break; case G_TYPE_BOOLEAN: if (!strcmp (value, "yes") || !strcmp (value, "no")) return; /* valid */ g_set_error (info->error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, _("invalid boolean property '%s' (not yes or no)"), key); break; default: g_set_error (info->error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, _("unhandled property '%s' type %s"), key, g_type_name (prop.type)); break; } } /* Did not find the property from valid_properties or the type did not match */ if (!info->table[i].name && strncmp(key, "form:", 5)) { g_warning ("property '%s' unknown", key); if (0) g_set_error (info->error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, _("property '%s' invalid or not supported"), key); } } static gboolean nm_iodine_properties_validate (NMSettingVPN *s_vpn, GError **error) { ValidateInfo info = { &valid_properties[0], error, FALSE }; nm_setting_vpn_foreach_data_item (s_vpn, validate_one_property, &info); if (!info.have_items) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, "%s", _("No VPN configuration options.")); return FALSE; } return *error ? FALSE : TRUE; } static gboolean nm_iodine_secrets_validate (NMSettingVPN *s_vpn, GError **error) { ValidateInfo info = { &valid_secrets[0], error, FALSE }; nm_setting_vpn_foreach_secret (s_vpn, validate_one_property, &info); if (!info.have_items) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, "%s", _("No VPN secrets!")); return FALSE; } return *error ? FALSE : TRUE; } static GValue * str_to_gvalue (const char *str, gboolean try_convert) { GValue *val; /* Empty */ if (!str || strlen (str) < 1) return NULL; if (!g_utf8_validate (str, -1, NULL)) { if (try_convert && !(str = g_convert (str, -1, "ISO-8859-1", "UTF-8", NULL, NULL, NULL))) str = g_convert (str, -1, "C", "UTF-8", NULL, NULL, NULL); if (!str) /* Invalid */ return NULL; } val = g_slice_new0 (GValue); g_value_init (val, G_TYPE_STRING); g_value_set_string (val, str); return val; } static GValue * uint_to_gvalue (guint32 num) { GValue *val; if (num == 0) return NULL; val = g_slice_new0 (GValue); g_value_init (val, G_TYPE_UINT); g_value_set_uint (val, num); return val; } static GValue * addr_to_gvalue (const char *str) { struct in_addr temp_addr; /* Empty */ if (!str || strlen (str) < 1) return NULL; if (inet_pton (AF_INET, str, &temp_addr) <= 0) return NULL; return uint_to_gvalue (temp_addr.s_addr); } static void value_destroy (gpointer data) { GValue *val = (GValue *) data; g_value_unset (val); g_slice_free (GValue, val); } static gint iodine_parse_stderr_line (NMVPNPlugin *plugin, const char* line, GHashTable *ip4config) { NMIODINEPluginPrivate *priv = NM_IODINE_PLUGIN_GET_PRIVATE (plugin); gchar **split = NULL; GValue *val; gint len; gint ret = 1; if (g_str_has_prefix(line, "Bad password")) { g_message ("Login failure"); priv->failure = NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED; ret = -1; goto out; } split = g_strsplit (line, " ", 0); len = g_strv_length (split); if (len < 2) goto out; if (g_str_has_prefix(line, "Server tunnel IP is ")) { g_message("PTP address: %s", split[len-1]); val = addr_to_gvalue (split[len-1]); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_PTP, val); val = addr_to_gvalue (split[len-1]); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY, val); } else if (g_str_has_prefix(line, "Sending DNS queries for ")) { g_message("External gw: %s", split[len-1]); val = addr_to_gvalue (split[len-1]); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY, val); } else if (g_str_has_prefix(line, "Sending raw traffic directly to ")) { /* If the DNS server is directly reachable we need to set it as external gateway overwriting the above valus */ g_message("Overwrite ext. gw. address: %s", split[len-1]); val = addr_to_gvalue (split[len-1]); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY, val); } else if (g_str_has_prefix(line, "Setting IP of dns")) { g_message("Address: %s", split[len-1]); val = addr_to_gvalue (split[len-1]); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS, val); } else if (g_str_has_prefix(line, "Setting MTU of ")) { g_message("MTU: %s", split[len-1]); val = addr_to_gvalue (split[len-1]); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_MTU, val); } else if (g_str_has_prefix(line, "Opened dns")) { g_message("Interface: %s", split[len-1]); val = str_to_gvalue (split[len-1], FALSE); if (val) g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV, val); } else if (g_str_has_prefix(line, "Connection setup complete, " "transmitting data.")) { val = uint_to_gvalue(27); g_hash_table_insert (ip4config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val); ret = 0; /* success */ } else g_message("%s", line); out: g_strfreev(split); return ret; } static gboolean iodine_stderr_cb (GIOChannel *source, GIOCondition condition, gpointer plugin) { GIOStatus status; GError *err = NULL; gchar *line; gint ret, l; NMIODINEPluginPrivate *priv = NM_IODINE_PLUGIN_GET_PRIVATE (plugin); status = g_io_channel_read_line (source, &line, NULL, NULL, &err); if (status != G_IO_STATUS_NORMAL) { g_warning ("Fetching data failed: %s", err->message); return FALSE; } l = strlen(line); if (l) line[l-1] = '\0'; ret = iodine_parse_stderr_line(plugin, line, priv->ip4config); if (!ret) { g_message("Parsing done, sending IP4 config"); nm_vpn_plugin_set_ip4_config(plugin, priv->ip4config); g_hash_table_destroy (priv->ip4config); priv->ip4config = NULL; } g_free (line); return TRUE; } static void iodine_watch_cb (GPid pid, gint status, gpointer user_data) { NMIODINEPlugin *plugin = NM_IODINE_PLUGIN (user_data); NMIODINEPluginPrivate *priv = NM_IODINE_PLUGIN_GET_PRIVATE (plugin); guint error = 0; if (WIFEXITED (status)) { error = WEXITSTATUS (status); if (error != 0) g_warning ("iodine exited with error code %d", error); } else if (WIFSTOPPED (status)) g_warning ("iodine stopped unexpectedly with signal %d", WSTOPSIG (status)); else if (WIFSIGNALED (status)) g_warning ("iodine died with signal %d", WTERMSIG (status)); else g_warning ("iodine died from an unknown cause"); /* Reap child if needed. */ waitpid (priv->pid, NULL, WNOHANG); priv->pid = 0; if (priv->failure >= 0) { nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), priv->failure); } else if (error) { nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED); } nm_vpn_plugin_set_state (NM_VPN_PLUGIN (plugin), NM_VPN_SERVICE_STATE_STOPPED); } static gboolean has_user(const char* user) { return (getpwnam(user) == NULL) ? FALSE : TRUE; } static void send_password(gint fd, NMSettingVPN *s_vpn) { const char *passwd; ssize_t ret; passwd = nm_setting_vpn_get_secret (s_vpn, NM_IODINE_KEY_PASSWORD); /* Don't send an empty password since this makes iodine block */ if (!passwd || !strlen(passwd)) passwd = ""; ret = write (fd, passwd, strlen(passwd)); if (ret < 0) g_warning("Password write failed"); ret = write (fd, "\n", 1); if (ret < 0) g_warning("Password write failed"); } static gint nm_iodine_start_iodine_binary(NMIODINEPlugin *plugin, NMSettingVPN *s_vpn, GError **error) { GPid pid; const char **iodine_binary = NULL; GPtrArray *iodine_argv; GSource *iodine_watch; GIOChannel *stderr_channel; gint stdin_fd, stderr_fd; const char *props_topdomain, *props_fragsize, *props_nameserver; /* Find iodine */ iodine_binary = iodine_binary_paths; while (*iodine_binary != NULL) { if (g_file_test (*iodine_binary, G_FILE_TEST_EXISTS)) break; iodine_binary++; } if (!*iodine_binary) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, "%s", _("Could not find iodine binary.")); return -1; } props_fragsize = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_FRAGSIZE); props_nameserver = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_NAMESERVER); props_topdomain = nm_setting_vpn_get_data_item (s_vpn, NM_IODINE_KEY_TOPDOMAIN); iodine_argv = g_ptr_array_new (); g_ptr_array_add (iodine_argv, (gpointer) (*iodine_binary)); /* Run in foreground */ g_ptr_array_add (iodine_argv, (gpointer) "-f"); if (props_fragsize && strlen(props_fragsize)) { g_ptr_array_add (iodine_argv, (gpointer) "-m"); g_ptr_array_add (iodine_argv, (gpointer) props_fragsize); } if (has_user(NM_IODINE_USER)) { g_ptr_array_add (iodine_argv, (gpointer) "-u"); g_ptr_array_add (iodine_argv, (gpointer) NM_IODINE_USER); } else g_warning("Running as root user"); if (!g_mkdir_with_parents(NM_IODINE_RUNDIR, 700)) { g_ptr_array_add (iodine_argv, (gpointer) "-t"); g_ptr_array_add (iodine_argv, (gpointer) NM_IODINE_RUNDIR); } else g_warning("Not running chrooted"); if (props_nameserver && strlen(props_nameserver)) g_ptr_array_add (iodine_argv, (gpointer) props_nameserver); if (props_topdomain && strlen(props_topdomain)) g_ptr_array_add (iodine_argv, (gpointer) props_topdomain); g_ptr_array_add (iodine_argv, NULL); if (!g_spawn_async_with_pipes (NULL, (char **) iodine_argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, &stdin_fd, NULL, &stderr_fd, error)) { g_ptr_array_free (iodine_argv, TRUE); g_warning ("iodine failed to start. error: '%s'", (*error)->message); return -1; } g_ptr_array_free (iodine_argv, TRUE); g_message ("iodine started with pid %d", pid); send_password (stdin_fd, s_vpn); close (stdin_fd); stderr_channel = g_io_channel_unix_new (stderr_fd); g_io_add_watch(stderr_channel, G_IO_IN, iodine_stderr_cb, plugin); NM_IODINE_PLUGIN_GET_PRIVATE (plugin)->pid = pid; iodine_watch = g_child_watch_source_new (pid); g_source_set_callback (iodine_watch, (GSourceFunc) iodine_watch_cb, plugin, NULL); g_source_attach (iodine_watch, NULL); g_source_unref (iodine_watch); return 0; } static gboolean real_connect (NMVPNPlugin *plugin, NMConnection *connection, GError **error) { NMSettingVPN *s_vpn; gint ret = -1; s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN)); g_assert (s_vpn); if (!nm_iodine_properties_validate (s_vpn, error)) goto out; if (!nm_iodine_secrets_validate (s_vpn, error)) goto out; ret = nm_iodine_start_iodine_binary (NM_IODINE_PLUGIN (plugin), s_vpn, error); if (!ret) return TRUE; out: return FALSE; } static gboolean real_need_secrets (NMVPNPlugin *plugin, NMConnection *connection, char **setting_name, GError **error) { NMSettingVPN *s_vpn; g_return_val_if_fail (NM_IS_VPN_PLUGIN (plugin), FALSE); g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE); s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN)); if (!s_vpn) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, "%s", "Could not process the request because the VPN" "connection settings were invalid."); return FALSE; } if (!nm_setting_vpn_get_secret (s_vpn, NM_IODINE_KEY_PASSWORD)) { *setting_name = NM_SETTING_VPN_SETTING_NAME; return TRUE; } return FALSE; } static gboolean ensure_killed (gpointer data) { int pid = GPOINTER_TO_INT (data); if (kill (pid, 0) == 0) kill (pid, SIGKILL); return FALSE; } static gboolean real_disconnect (NMVPNPlugin *plugin, GError **err) { NMIODINEPluginPrivate *priv = NM_IODINE_PLUGIN_GET_PRIVATE (plugin); if (priv->pid) { if (kill (priv->pid, SIGTERM) == 0) g_timeout_add (2000, ensure_killed, GINT_TO_POINTER (priv->pid)); else kill (priv->pid, SIGKILL); g_message ("Terminated iodine daemon with PID %d.", priv->pid); priv->pid = 0; } return TRUE; } static void nm_iodine_plugin_init (NMIODINEPlugin *plugin) { NMIODINEPluginPrivate *priv = NM_IODINE_PLUGIN_GET_PRIVATE (plugin); priv->ip4config = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, value_destroy); priv->failure = -1; } static void nm_iodine_plugin_class_init (NMIODINEPluginClass *iodine_class) { GObjectClass *object_class = G_OBJECT_CLASS (iodine_class); NMVPNPluginClass *parent_class = NM_VPN_PLUGIN_CLASS (iodine_class); g_type_class_add_private (object_class, sizeof (NMIODINEPluginPrivate)); /* virtual methods */ parent_class->connect = real_connect; parent_class->need_secrets = real_need_secrets; parent_class->disconnect = real_disconnect; } NMIODINEPlugin * nm_iodine_plugin_new (void) { return (NMIODINEPlugin *) g_object_new (NM_TYPE_IODINE_PLUGIN, NM_VPN_PLUGIN_DBUS_SERVICE_NAME, NM_DBUS_SERVICE_IODINE, NULL); } static void quit_mainloop (NMIODINEPlugin *plugin, gpointer user_data) { g_main_loop_quit ((GMainLoop *) user_data); } int main (int argc, char *argv[]) { NMIODINEPlugin *plugin; GMainLoop *main_loop; #if !GLIB_CHECK_VERSION(2,36,0) g_type_init (); #endif plugin = nm_iodine_plugin_new (); if (!plugin) exit (EXIT_FAILURE); main_loop = g_main_loop_new (NULL, FALSE); g_signal_connect (plugin, "quit", G_CALLBACK (quit_mainloop), main_loop); g_main_loop_run (main_loop); g_main_loop_unref (main_loop); g_object_unref (plugin); exit (EXIT_SUCCESS); } network-manager-iodine-0.0.5/src/nm-iodine-service.h000066400000000000000000000043421241646210600223440ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ /* NetworkManager -- Network link manager * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright © 2012 Guido Günther */ #ifndef NM_IODINE_PLUGIN_H #define NM_IODINE_PLUGIN_H #include #include #define NM_TYPE_IODINE_PLUGIN (nm_iodine_plugin_get_type ()) #define NM_IODINE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IODINE_PLUGIN, NMIODINEPlugin)) #define NM_IODINE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IODINE_PLUGIN, NMIODINEPluginClass)) #define NM_IS_IODINE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IODINE_PLUGIN)) #define NM_IS_IODINE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_IODINE_PLUGIN)) #define NM_IODINE_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IODINE_PLUGIN, NMIODINEPluginClass)) #define NM_DBUS_SERVICE_IODINE "org.freedesktop.NetworkManager.iodine" #define NM_DBUS_INTERFACE_IODINE "org.freedesktop.NetworkManager.iodine" #define NM_DBUS_PATH_IODINE "/org/freedesktop/NetworkManager/iodine" #define NM_IODINE_KEY_TOPDOMAIN "topdomain" #define NM_IODINE_KEY_NAMESERVER "nameserver" #define NM_IODINE_KEY_FRAGSIZE "fragsize" #define NM_IODINE_KEY_PASSWORD "password" typedef struct { NMVPNPlugin parent; } NMIODINEPlugin; typedef struct { NMVPNPluginClass parent; } NMIODINEPluginClass; GType nm_iodine_plugin_get_type (void); NMIODINEPlugin *nm_iodine_plugin_new (void); #endif /* NM_IODINE_PLUGIN_H */