Loading libcutils/uevent.c +2 −1 Original line number Original line Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <cutils/uevent.h> #include <cutils/uevent.h> #include <errno.h> #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdbool.h> #include <string.h> #include <string.h> #include <strings.h> #include <strings.h> Loading Loading @@ -104,7 +105,7 @@ int uevent_open_socket(int buf_sz, bool passcred) addr.nl_pid = getpid(); addr.nl_pid = getpid(); addr.nl_groups = 0xffffffff; addr.nl_groups = 0xffffffff; s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); s = socket(PF_NETLINK, SOCK_DGRAM | O_CLOEXEC, NETLINK_KOBJECT_UEVENT); if(s < 0) if(s < 0) return -1; return -1; Loading libnetutils/ifc_utils.c +2 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <unistd.h> #include <unistd.h> #include <string.h> #include <string.h> #include <errno.h> #include <errno.h> #include <fcntl.h> #include <sys/socket.h> #include <sys/socket.h> #include <sys/select.h> #include <sys/select.h> Loading Loading @@ -311,7 +312,7 @@ int ifc_act_on_address(int action, const char *name, const char *address, req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(addrlen); req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(addrlen); memcpy(RTA_DATA(rta), addr, addrlen); memcpy(RTA_DATA(rta), addr, addrlen); s = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); s = socket(PF_NETLINK, SOCK_RAW | O_CLOEXEC, NETLINK_ROUTE); if (send(s, &req, req.n.nlmsg_len, 0) < 0) { if (send(s, &req, req.n.nlmsg_len, 0) < 0) { close(s); close(s); return -errno; return -errno; Loading Loading
libcutils/uevent.c +2 −1 Original line number Original line Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <cutils/uevent.h> #include <cutils/uevent.h> #include <errno.h> #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdbool.h> #include <string.h> #include <string.h> #include <strings.h> #include <strings.h> Loading Loading @@ -104,7 +105,7 @@ int uevent_open_socket(int buf_sz, bool passcred) addr.nl_pid = getpid(); addr.nl_pid = getpid(); addr.nl_groups = 0xffffffff; addr.nl_groups = 0xffffffff; s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); s = socket(PF_NETLINK, SOCK_DGRAM | O_CLOEXEC, NETLINK_KOBJECT_UEVENT); if(s < 0) if(s < 0) return -1; return -1; Loading
libnetutils/ifc_utils.c +2 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <unistd.h> #include <unistd.h> #include <string.h> #include <string.h> #include <errno.h> #include <errno.h> #include <fcntl.h> #include <sys/socket.h> #include <sys/socket.h> #include <sys/select.h> #include <sys/select.h> Loading Loading @@ -311,7 +312,7 @@ int ifc_act_on_address(int action, const char *name, const char *address, req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(addrlen); req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(addrlen); memcpy(RTA_DATA(rta), addr, addrlen); memcpy(RTA_DATA(rta), addr, addrlen); s = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); s = socket(PF_NETLINK, SOCK_RAW | O_CLOEXEC, NETLINK_ROUTE); if (send(s, &req, req.n.nlmsg_len, 0) < 0) { if (send(s, &req, req.n.nlmsg_len, 0) < 0) { close(s); close(s); return -errno; return -errno; Loading