use /var/run/DeviceKit-disks, not /tmp as a temporary directory
authorDavid Zeuthen <davidz@redhat.com>
Mon, 6 Apr 2009 23:47:22 +0000 (19:47 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 6 Apr 2009 23:47:22 +0000 (19:47 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=491744

src/Makefile.am
src/job-mkfs.c

index 0f3b6fc..e278dfa 100644 (file)
@@ -188,3 +188,5 @@ clean-local :
 install-data-local:
        -$(mkdir_p) $(DESTDIR)$(localstatedir)/lib/DeviceKit-disks
        -chmod 0700 $(DESTDIR)$(localstatedir)/lib/DeviceKit-disks
+       -$(mkdir_p) $(DESTDIR)$(localstatedir)/run/DeviceKit-disks
+       -chmod 0700 $(DESTDIR)$(localstatedir)/run/DeviceKit-disks
index 4e32358..eb1d94b 100644 (file)
@@ -304,7 +304,7 @@ main (int argc, char **argv)
 
         /* take ownership of the device if requested */
         if (take_ownership_uid != 0 || take_ownership_gid != 0) {
-                char dir[256] = "/tmp/devkit-disks-mkfs-XXXXXX";
+                char dir[256] = PACKAGE_LOCALSTATE_DIR "/run/DeviceKit-disks/job-mkfs-XXXXXX";
 
                 if (mkdtemp (dir) == NULL) {
                         g_printerr ("cannot create directory %s: %m\n", dir);