Hello community,
here is the log from the commit of package cryptconfig
checked in at Fri Mar 30 16:37:05 CEST 2007.
--------
--- cryptconfig/cryptconfig.changes 2007-03-12 18:19:50.000000000 +0100
+++ /mounts/work_src_done/STABLE/cryptconfig/cryptconfig.changes 2007-03-30 16:24:30.341526000 +0200
@@ -1,0 +2,6 @@
+Fri Mar 30 16:24:07 CEST 2007 - crivera@suse.de
+
+- Fix the copy_user_data() function to make sure dot directories
+ are getting copied. This fixes 259113.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cryptconfig.spec ++++++
--- /var/tmp/diff_new_pack.E21193/_old 2007-03-30 16:37:00.000000000 +0200
+++ /var/tmp/diff_new_pack.E21193/_new 2007-03-30 16:37:00.000000000 +0200
@@ -12,7 +12,7 @@
Name: cryptconfig
Version: 0.1.0
-Release: 18
+Release: 22
Group: System/Base
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Summary: A Utility to Configure Encrypted Home Directories and LUKS Partitions
@@ -62,6 +62,9 @@
%doc %{_mandir}/man8/cryptconfig.8.gz
%changelog
+* Fri Mar 30 2007 - crivera@suse.de
+- Fix the copy_user_data() function to make sure dot directories
+ are getting copied. This fixes 259113.
* Mon Mar 12 2007 - crivera@suse.de
- Implement pam_sm_open_session() and pam_sm_close_session() for
pam_cryptpass. This lets us hook into the session stack, before pam_mount,
++++++ cryptconfig-0.1.0.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cryptconfig-0.1.0/ChangeLog new/cryptconfig-0.1.0/ChangeLog
--- old/cryptconfig-0.1.0/ChangeLog 2007-03-05 22:56:19.000000000 +0100
+++ new/cryptconfig-0.1.0/ChangeLog 2007-03-30 02:24:32.000000000 +0200
@@ -1,3 +1,12 @@
+2007-03-29 Chris Rivera
+
+ * src/cryptconfig-lib.c:
+
+ Fix the copy_user_data() function to make sure dot directories are getting
+ copied. This fixes 259113.
+
+ * run-cc-tests.py: Update to check for dot directories.
+
2007-03-05 Chris Rivera
* src/pam_cryptpass.c:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cryptconfig-0.1.0/src/cryptconfig-lib.c new/cryptconfig-0.1.0/src/cryptconfig-lib.c
--- old/cryptconfig-0.1.0/src/cryptconfig-lib.c 2007-03-05 22:24:46.000000000 +0100
+++ new/cryptconfig-0.1.0/src/cryptconfig-lib.c 2007-03-30 02:24:32.000000000 +0200
@@ -1505,30 +1505,39 @@
*/
gboolean copy_user_data (const char *home_dir, const char *dest)
{
- gchar *cmd, *argv[] = { "/bin/sh", "-c", NULL, NULL };
- GError *err = NULL;
- GPid child_pid;
- int status;
- gboolean ret;
-
- cmd = g_strdup_printf ("/bin/cp -axp %s/* %s", home_dir, dest);
- argv[2] = cmd;
- ret = g_spawn_async_with_pipes (NULL, argv, NULL,
- G_SPAWN_DO_NOT_REAP_CHILD |
- G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
- NULL, NULL, &child_pid, NULL, NULL, NULL, &err);
- g_free (cmd);
- if (!ret) {
- g_printerr (_("copy failed: %s\n"), err->message);
- g_error_free (err);
+ const gchar *file = NULL;
+ GError *dir_err = NULL;
+ GDir *dir = NULL;
+
+ dir = g_dir_open (home_dir, 0, &dir_err);
+ if (!dir) {
+ g_printerr (_("g_dir_open: %s\n"), dir_err->message);
+ g_error_free (dir_err);
return FALSE;
}
+
+ while ((file = g_dir_read_name (dir))) {
+ gchar *src = g_strdup_printf ("%s/%s", home_dir, file);
+ gchar *ds = g_strdup (dest);
+ gchar *argv[] = { "/bin/cp", "-axp", src, ds, NULL };
+ GError *err = NULL;
+ gint status;
+
+ gboolean ret = g_spawn_sync (NULL, argv, NULL,
+ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
+ NULL, NULL, NULL, NULL, &status, &err);
+ g_free (src);
+ g_free (ds);
+ if (!ret || WEXITSTATUS (status) != 0) {
+ g_printerr (_("copy failed: %s\n"), err->message);
+ g_error_free (err);
+ g_dir_close (dir);
+ return FALSE;
+ }
+ }
- if (waitpid (child_pid, &status, 0) == -1 || WEXITSTATUS (status) != 0)
- ret = FALSE;
-
- g_spawn_close_pid (child_pid);
- return ret;
+ g_dir_close (dir);
+ return TRUE;
}
/*
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org