From: Bastien Nocera <hadess@hadess.net>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 3/3] obex: Use XDG_RUNTIME_DIR as a default root
Date: Sat, 09 Nov 2013 18:03:18 +0100 [thread overview]
Message-ID: <1384016598.3880.38.camel@nuvo> (raw)
It's per-user, so we won't try to overwrite somebody else's
files in /tmp when that happens.
---
obexd/src/main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/obexd/src/main.c b/obexd/src/main.c
index 61a06b2..15777f5 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
@@ -50,8 +50,6 @@
#include "obexd.h"
#include "server.h"
-#define DEFAULT_ROOT_PATH "/tmp"
-
#define DEFAULT_CAP_FILE CONFIGDIR "/capability.xml"
static GMainLoop *main_loop = NULL;
@@ -286,7 +284,7 @@ int main(int argc, char *argv[])
}
if (option_root == NULL)
- option_root = g_strdup(DEFAULT_ROOT_PATH);
+ option_root = g_build_filename (g_get_user_runtime_dir (), "obexd", NULL);
if (option_root[0] != '/') {
char *old_root = option_root, *home = getenv("HOME");
--
1.8.4.2
next reply other threads:[~2013-11-09 17:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-09 17:03 Bastien Nocera [this message]
2013-11-10 13:46 ` [PATCH 3/3] obex: Use XDG_RUNTIME_DIR as a default root Bastien Nocera
2013-11-11 9:00 ` Luiz Augusto von Dentz
2013-11-11 12:35 ` Bastien Nocera
2013-11-11 13:01 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384016598.3880.38.camel@nuvo \
--to=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox