search for: log_err

Displaying 20 results from an estimated 141 matches for "log_err".

2007 Oct 18
0
[PATCH] Use a control socket directory to restrict access
...trol.c @@ -191,6 +191,7 @@ static void handle_new_control_socket(int fd, short events, void *data) { memset(&greeting, 0, sizeof greeting); greeting.version = TINC_CTL_VERSION_CURRENT; + greeting.pid = getpid(); if(bufferevent_write(ev, &greeting, sizeof greeting) == -1) { logger(LOG_ERR, _("Cannot send greeting for new control connection: %s"), @@ -213,52 +214,88 @@ static int control_compare(const struct event *a, const struct event *b) { bool init_control() { int result; struct sockaddr_un addr; + char *lastslash; + const char *controlsocketbasename = contr...
2000 Nov 08
1
socket leakage patch
...ff -uNr tinc-1.0pre2.org/src/net.c tinc-1.0pre2/src/net.c --- tinc-1.0pre2.org/src/net.c Wed May 31 12:23:05 2000 +++ tinc-1.0pre2/src/net.c Wed Nov 8 09:36:05 2000 @@ -357,6 +357,7 @@ if(setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) { + close(nfd); syslog(LOG_ERR, _("setsockopt: %m")); return -1; } @@ -364,6 +365,7 @@ flags = fcntl(nfd, F_GETFL); if(fcntl(nfd, F_SETFL, flags | O_NONBLOCK) < 0) { + close(nfd); syslog(LOG_ERR, _("fcntl: %m")); return -1; } @@ -375,12 +377,14 @@ if(bind...
2008 May 16
1
error: failed reading from tcp: Connection reset by peer
...ed and nervous when I saw these messages). I've included a very short patch to NSD that seems to do the trick. -- Shane --- server.c.orig 2008-05-16 10:20:25.000000000 +0200 +++ server.c 2008-05-16 10:21:44.000000000 +0200 @@ -1394,7 +1394,9 @@ */ return; } else { - log_msg(LOG_ERR, "failed reading from tcp: %s", strerror(errno)); + if (errno != ECONNRESET) { + log_msg(LOG_ERR, "failed reading from tcp: %s", strerror(errno)); + } cleanup_tcp_handler(netio, handler); return; } @@ -1454,7 +1456,9 @@ */ return; } else { -...
2003 Feb 20
0
Netbios name service forwarding.
...me = { 0 }; iface i = (iface) malloc (sizeof (struct iface_struct)); int fd; int one = 1; int j; struct ifreq ifr = { 0 }; bzero (i, sizeof (struct iface_struct)); i->name = strdup (name); i->fd = socket (AF_INET, SOCK_DGRAM, 0); if (i->fd < 0) { syslog (LOG_ERR, "Can't open socket: %m"); exit (1); } strcpy (&ifr.ifr_name[0], name); if (setsockopt (i->fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof (ifr))) { syslog (LOG_ERR, "Can't bind to interface %s: %m", name); exit (1); } bzer...
2003 Jun 02
4
quick poppassd question
...e me. What's the general feeling about the security of poppassd provided that users with valid passwords already have shell access to the system, and now nobody can try to change priveleged accounts' passwords? --- cut --- if ((pw = getpwnam (user)) == NULL) { syslog (LOG_ERR, "Unknown user, %s", user); sleep (5); WriteToClient ("500 Old password is incorrect."); exit(1); } /* begin added code */ if ((pw->pw_uid) < 1001) { syslog (LOG_ERR, "Priveleged user, %s", user);...
2017 Feb 13
0
[cifs-utils PATCH] cifs.upcall: switch group IDs when handling an upcall
...s down the gid, so we resort here to scraping + * one out of /etc/passwd (or the equivalent). Note that this might + * not reflect the actual gid of the process that initiated the + * upcall, but it's safer than relying on the current creds. + */ + pw = getpwuid(uid); + if (!pw) { + syslog(LOG_ERR, "Unable to find pw entry for uid %d: %s\n", + uid, strerror(errno)); + rc = 1; + goto out; + } + + /* * Must do this before setuid, as we need ptrace perms to look at * environ file. */ env_cachename = get_cachename_from_process_env(env_probe ? arg.pid : 0); + /* + * Th...
2009 Jul 10
1
PowerWare USB debug messages
Earlier this year, I added a patch to my local NUT tree to additionally print the value of usb_strerror() if usb_clear_halt() failed. (Ignore the commented-out goto.) Since these messages are at the LOG_ERR level, should we add usb_strerror() to all of the calls in nut_usb.c? diff --git a/drivers/nut_usb.c b/drivers/nut_usb.c index 494a1fa..4ca2691 100644 --- a/drivers/nut_usb.c +++ b/drivers/nut_usb.c @@ -165,8 +165,8 @@ usb_dev_handle *nutusb_open(const char *port) if (usb_clear_halt(dev_h...
2013 Oct 25
1
Shutdown problem with Mecer 1000VA Online UPS
..., and not a 'operation not permitted' error. In any case, this is actually considered to be a success by the code. This is not right. Code as follows: 418 /* 419 * If a command is invalid, it will be echoed back 420 */ 421 if (blazer_command(buf, buf, sizeof(buf)) > 0) { 422 upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname); 423 return STAT_INSTCMD_FAILED; 424 } 425 426 upslogx(LOG_INFO, "instcmd: command [%s] handled", cmdname); 427 return STAT_INSTCMD_HANDLED; As far as I understand the code line 421 tries to test for a 'comms failure' (e.g. dri...
2017 Feb 15
5
[cifs-utils PATCH v3 0/4] cifs.upcall: allow cifs.upcall to scrape cache location initiating task's environment
Apologies for v3 series, I had some extra patches in there. This is the one that should have been sent. Relabeled as v4 for clarity. Third respin of this series. Reordered for better safety for bisecting. The environment scraping is now on by default, but can be disabled with "-E" in environments where it's not needed. Also, I've added a patch to make cifs.upcall drop
2004 Jan 13
1
tftpd-hpa suggestions
Hello, Peter and others! there are some issues regarding the tftp-hpa server: 1. Running as Windows service seems to require that the application does not detach (otherwise "net start" says smth. like "could not start, the service didn't report any errors"). The attached patch adds the option "-n", which can be used to have tftpd run in foreground.
2004 Mar 02
2
[PATCH] Force mountd(8) to a specified port.
...)); + sin6.sin6_len = sizeof(struct sockaddr_in6); + sin6.sin6_family = AF_INET6; + sin6.sin6_port = htons(svcport); + } if (udpsock != -1 && udpconf != NULL) { - bindresvport(udpsock, NULL); + if (svcport != 0) { + r = bindresvport(udpsock, &sin); + if (r != 0) { + syslog(LOG_ERR, "bindresvport: %m"); + exit(1); + } + } else + (void)bindresvport(udpsock, NULL); udptransp = svc_dg_create(udpsock, 0, 0); if (udptransp != NULL) { if (!svc_reg(udptransp, RPCPROG_MNT, RPCMNT_VER1, @@ -411,7 +441,14 @@ } if (tcpsock != -1 && tcpconf != NU...
2009 Sep 05
5
[tftpd PATCH 0/5] pidfile option and syslog fix
Hi, This is my current patch queue. The patches are independent, AFAIK, so feel free to cherry-pick or reject them independently. The bottom one was needed for a successful build here; the top one contains all the modifications you requested on IRC, and more. Meanwhile I hit one of the four stray TABs in tftpd.c, and decided to get rid of them. Comments welcome. --- Ferenc Wagner (5):
2010 Mar 04
1
Making tftpd (hpa) firewall frienldy
...SO_REUSEPORT + { int x = 1; setsockopt (fd4, SOL_SOCKET, SO_REUSEPORT , &x, sizeof (x)); } +#endif + memset(&bindaddr4, 0, sizeof bindaddr4); bindaddr4.sin_family = AF_INET; bindaddr4.sin_addr.s_addr = INADDR_ANY; @@ -900,6 +905,14 @@ syslog(LOG_ERR, "socket: %m"); exit(EX_IOERR); } + { int x = 1; setsockopt (peer, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x)); } +#ifdef SO_REUSEPORT + { int x = 1; setsockopt (peer, SOL_SOCKET, SO_REUSEPORT , &x, sizeof (x)); } +#endif + if (pick_port_bind(peer, &myaddr,...
2001 Feb 12
0
log-server.c patch: adding tag to every log output.
...ot;)" + #endif + void do_log(LogLevel level, const cAr *fmt, va_list args) { *************** *** 133,169 **** if (level > log_level) return; switch (level) { - case SYSLOG_LEVEL_ERROR: - txt = "error"; - pri = LOG_ERR; - break; case SYSLOG_LEVEL_FATAL: ! txt = "fatal"; pri = LOG_ERR; break; case SYSLOG_LEVEL_INFO: case SYSLOG_LEVEL_VERBOSE: pri = LOG_INFO; break; case SYSLOG_LEVEL...
2007 Oct 18
0
[PATCH] Use credentials and permissions on control socket where available
...trol.c @@ -191,6 +191,7 @@ static void handle_new_control_socket(int fd, short events, void *data) { memset(&greeting, 0, sizeof greeting); greeting.version = TINC_CTL_VERSION_CURRENT; + greeting.pid = getpid(); if(bufferevent_write(ev, &greeting, sizeof greeting) == -1) { logger(LOG_ERR, _("Cannot send greeting for new control connection: %s"), @@ -213,6 +214,7 @@ static int control_compare(const struct event *a, const struct event *b) { bool init_control() { int result; struct sockaddr_un addr; + mode_t old_umask; if(strlen(controlsocketname) >= sizeo...
2012 Jul 23
1
[PATCH] nsd-patch: fix segfault after renaming slave zone
...zone->opts->name); > continue; > } zone->opts is filled in in difffile.c around line 675: > zone->opts = zone_options_find(opt, domain_dname(zone->apex)); > if(!zone->opts) { > log_msg(LOG_ERR, "xfr: zone %s not in config.", > dname_to_string(zone_name,0)); > return 0; > } As a result, nsd-patch tries to dereference a null pointer when trying to print zone name. I think the proper fix is to move the code that adds zone...
2017 Feb 15
5
[cifs-utils PATCH v3 0/4] cifs.upcall: allow cifs.upcall to scrape cache location initiating task's environment
Third respin of this series. Reordered for better safety for bisecting. The environment scraping is now on by default, but can be disabled with "-E" in environments where it's not needed. Also, I've added a patch to make cifs.upcall drop capabilities before doing most of its work. This may help reduce the attack surface of the program. Jeff Layton (4): cifs.upcall: convert
2009 Jul 19
3
[PATCH] tftpd.c: write a pid file in standalone mode
...from a portability standpoint */ @@ -475,6 +484,9 @@ int main(int argc, char **argv) printf("%s\n", TFTPD_CONFIG_STR); exit(0); break; + case 'P': + pidfile = optarg; + break; default: syslog(LOG_ERR, "Unknown option: '%c'", optopt); break; @@ -507,9 +519,6 @@ int main(int argc, char **argv) exit(EX_NOUSER); } - if (spec_umask || !unixperms) - umask(my_umask); - #ifdef WITH_REGEX if (rewrite_file) rewrite_rules = read_remap...
2018 Jan 16
3
Windows TAP driver issues
Thanks for the info, that is very helpful. It does look like that change got back-ported to master, albeit in a different form. I'll take a look at how OpenVPN does its windows device I/O. - todd
2008 Jul 10
2
[PATCH] tripplite driver updates
...quency", "%02.2f", freq); status_init(); /* Battery Voltage Condition */ - switch (buf[0]) { + switch (bcond) { case '0': /* Low Battery */ status_set("LB"); break; case '1': /* Normal */ break; default: /* Unknown */ - upslogx(LOG_ERR, "Unknown battery state: %c", buf[0]); + upslogx(LOG_ERR, "Unknown battery state: %c", bcond); break; } /* Load State */ - switch (buf[1]) { + switch (lstate) { case '0': /* Overload */ status_set("OVER"); break; case '1': /* N...