From 243278fd360fb291a43a8ed2c8bed75d81e69660 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 5 Oct 2021 22:10:59 -0400 Subject: Delete local-path socket like normal --- bounce.c | 1 + local.c | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/bounce.c b/bounce.c index beab2bc..2548626 100644 --- a/bounce.c +++ b/bounce.c @@ -530,6 +530,7 @@ int main(int argc, char *argv[]) { } clientFree(client); } + if (bindPath[0]) unlink(bindPath); } #ifdef __OpenBSD__ diff --git a/local.c b/local.c index 954c015..4f0cc5e 100644 --- a/local.c +++ b/local.c @@ -27,14 +27,11 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -141,13 +138,6 @@ size_t localBind(int fds[], size_t cap, const char *host, const char *port) { } static bool unix; -static int unixDir = -1; -static char unixFile[PATH_MAX]; - -static void unixUnlink(void) { - int error = unlinkat(unixDir, unixFile, 0); - if (error) warn("unlinkat"); -} static int unixBind(int sock, const char *path) { struct sockaddr_un addr = { .sun_family = AF_UNIX }; @@ -182,20 +172,6 @@ size_t localUnix(int fds[], size_t cap, const char *path) { int error = unixBind(sock, path); if (error) err(EX_UNAVAILABLE, "%s", path); - char dir[PATH_MAX] = "."; - const char *base = strrchr(path, '/'); - if (base) { - snprintf(dir, sizeof(dir), "%.*s", (int)(base - path), path); - base++; - } else { - base = path; - } - snprintf(unixFile, sizeof(unixFile), "%s", base); - - unixDir = open(dir, O_DIRECTORY); - if (unixDir < 0) err(EX_UNAVAILABLE, "%s", dir); - atexit(unixUnlink); - unix = true; fds[0] = sock; return 1; -- cgit 1.4.1 td>
path: root/irc (unfollow)
Commit message (Expand)Author
2021-03-24Update catgirl to 1.7June McEnroe
2021-03-24Import irc/catgirl from ports svnJune McEnroe
2021-03-24Import security/libretls from ports svnJune McEnroe
2021-03-08Add bubger portJune McEnroe
2021-03-08Update catsit to 1.3June McEnroe
2021-03-08Update imbox to 1.4June McEnroe
2021-02-09Update catgirl to 1.6June McEnroe
2021-02-08Update catsit to 1.2June McEnroe
2021-02-08Update pounce to 2.3June McEnroe
2021-02-04Update cgit-causal-agency to 8e4c63cJune McEnroe
2021-01-20Update cgit-causal-agency to 8a10aa5June McEnroe
2021-01-17Update cgit-causal-agencyJune McEnroe
2021-01-17Update scooper to 1.1June McEnroe
2021-01-17Update catgirl to 1.5 (BONUS WEBISODE)June McEnroe
2021-01-15Update litterbox to 1.7June McEnroe
2021-01-15Update pounce to 2.2June McEnroe
2021-01-15Update catgirl to 1.4June McEnroe
2020-12-28Replace cgit-patched with cgit-causal-agencyJune McEnroe
2020-12-18Add notemap portJune McEnroe
2020-12-15Update libretls to 3.3.1June McEnroe
2020-12-15Update catsit to 1.1June McEnroe
2020-12-15Update pounce to 2.1p1June McEnroe
2020-12-15Add imbox portJune McEnroe
2020-11-24Update pounce to 2.1June McEnroe
2020-11-24Update libretls to 3.3.0June McEnroe
2020-11-17Update catgirl to 1.3June McEnroe
2020-11-17Update libretls to 3.2.2June McEnroe
2020-09-29Update libretls to 3.2.1June McEnroe
2020-09-10Update catgirl to 1.2June McEnroe
2020-09-09Add pounce-palaver portJune McEnroe
2020-09-09Update pounce to 2.0June McEnroe
2020-09-09Update litterbox to 1.6June McEnroe
2020-08-23Add scooper portJune McEnroe
2020-08-23Add catsit portJune McEnroe
2020-08-13Update pounce to 1.4p2June McEnroe
2020-08-11Update pounce to 1.4p1June McEnroe
2020-08-10Add litterbox portJune McEnroe
2020-08-10Add missing USES=pkgconfig to pounceJune McEnroe