From e48937e99de79f2a6c0666983b9289b3d86b345a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 11 Jul 2016 12:03:01 +0200 Subject: Add .socket suffix to the socket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/gammad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gammad.c b/src/gammad.c index 43c3586..17cd900 100644 --- a/src/gammad.c +++ b/src/gammad.c @@ -94,11 +94,11 @@ static char* get_socket_pathname(libgamma_site_state_t* site) if ((pw = getpwuid(getuid()))) username = pw->pw_name ? pw->pw_name : ""; - n = sizeof("%s/.gammad/~%s/%i%s%s") + 3 * sizeof(int); + n = sizeof("%s/.gammad/~%s/%i%s%s.socket") + 3 * sizeof(int); n += strlen(rundir) + strlen(username) + strlen(name); if (!(rc = malloc(n))) goto fail; - sprintf(rc, "%s/.gammad/~%s/%i%s%s", + sprintf(rc, "%s/.gammad/~%s/%i%s%s.socket", rundir, username, site->method, name ? "." : "", name ? name : ""); return rc; -- cgit v1.2.3-70-g09d2