diff options
Diffstat (limited to 'net-irc/bitchx/files/1.1/bitchx-1.1-open-mode.patch')
-rw-r--r-- | net-irc/bitchx/files/1.1/bitchx-1.1-open-mode.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net-irc/bitchx/files/1.1/bitchx-1.1-open-mode.patch b/net-irc/bitchx/files/1.1/bitchx-1.1-open-mode.patch new file mode 100644 index 000000000000..1eeba358eb30 --- /dev/null +++ b/net-irc/bitchx/files/1.1/bitchx-1.1-open-mode.patch @@ -0,0 +1,33 @@ +diff -Naur BitchX.old/source/commands2.c BitchX/source/commands2.c +--- BitchX.old/source/commands2.c 2003-04-11 03:09:07.000000000 +0200 ++++ BitchX/source/commands2.c 2009-11-17 00:51:56.000000000 +0100 +@@ -2575,7 +2575,7 @@ + { + char buf[BIG_BUFFER_SIZE+1]; + sprintf(buf, socket_path, port); +- if ((u = open(buf, O_CREAT|O_WRONLY)) != -1) ++ if ((u = open(buf, O_CREAT|O_WRONLY, 0644)) != -1) + { + chmod(buf, SOCKMODE); + chown(buf, getuid(), getgid()); +diff -Naur BitchX.old/source/dcc.c BitchX/source/dcc.c +--- BitchX.old/source/dcc.c 2003-04-11 03:09:07.000000000 +0200 ++++ BitchX/source/dcc.c 2009-11-17 00:52:56.000000000 +0100 +@@ -1818,7 +1818,7 @@ + flags |= DCC_ACTIVE; + set_socketflags(new_s, flags); + set_socketinfo(new_s, n); +- if ((n->file = open(n->filename, O_RDONLY | O_BINARY)) == -1) ++ if ((n->file = open(n->filename, O_RDONLY | O_BINARY, 0644)) == -1) + { + erase_dcc_info(new_s, 1, "%s", convert_output_format("$G %RDCC%n Unable to open $0: $1-", "%s %s", n->filename, errno ? strerror(errno) : "Unknown Host")); + close_socketread(new_s); +@@ -2273,7 +2273,7 @@ + tmp = m_strdup(new->filename); + if (!(fullname = expand_twiddle(tmp))) + malloc_strcpy(&fullname, tmp); +- if ((new->file = open(fullname, O_WRONLY | O_CREAT | O_BINARY)) != -1) ++ if ((new->file = open(fullname, O_WRONLY | O_CREAT | O_BINARY, 0644)) != -1) + { + if ((new = dcc_create(nick, new->filename, passwd, 0, port? atol(port) : 0, DCC_REFILEREAD, (tdcc?DCC_TDCC:0) | DCC_TWOCLIENTS|DCC_OFFER, start_dcc_get))) + new->blocksize = blocksize; |