summaryrefslogtreecommitdiff
path: root/src/launchpad_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/launchpad_common.c')
-rw-r--r--src/launchpad_common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/launchpad_common.c b/src/launchpad_common.c
index da3ba04..21cb409 100644
--- a/src/launchpad_common.c
+++ b/src/launchpad_common.c
@@ -1353,3 +1353,20 @@ int _verify_proc_caps(void)
return 0;
}
+
+int _prepare_id_file(void)
+{
+ char path[PATH_MAX];
+ int fd;
+
+ snprintf(path, sizeof(path), "/run/aul/apps/%u/%d/%s",
+ getuid(), getpid(), getenv("AUL_APPID"));
+ fd = open(path, O_CREAT | O_WRONLY | O_TRUNC, 0600);
+ if (fd < 0) {
+ _E("Failed to create %s. errno(%d)", path, errno);
+ return -1;
+ }
+ close(fd);
+
+ return 0;
+}