summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-09-19 21:47:44 +0200
committerGravatar Martin Szulecki2013-09-19 21:47:44 +0200
commit7de9ac3ed900701fd2fafb2e0c006b56f18672d7 (patch)
treebbf7c0bd28b387c39362ce961017ff04e2b4a48b /src/main.c
parent130d1ca4d5d99ef4a470e90db64116a0de55b43e (diff)
downloadusbmuxd-7de9ac3ed900701fd2fafb2e0c006b56f18672d7.tar.gz
usbmuxd-7de9ac3ed900701fd2fafb2e0c006b56f18672d7.tar.bz2
preflight: Use userpref_get_system_buid() instead of hardcoded path
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index bb2eb2c..7ae3532 100644
--- a/src/main.c
+++ b/src/main.c
@@ -47,9 +47,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "device.h"
#include "client.h"
+extern const char* userpref_get_config_dir();
+
static const char *socket_path = "/var/run/usbmuxd";
static const char *lockfile = "/var/run/usbmuxd.pid";
-static const char *userprefdir = "/var/lib/lockdown";
int should_exit;
int should_discover;
@@ -529,6 +530,8 @@ int main(int argc, char *argv[])
if(listenfd < 0)
goto terminate;
+ const char* userprefdir = userpref_get_config_dir();
+
struct stat fst;
int userprefdir_created = 0;
if (stat(userprefdir, &fst) < 0) {