diff options
Diffstat (limited to 'src/libstrongswan/networking')
-rw-r--r-- | src/libstrongswan/networking/host.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/host.h | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/host_resolver.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/host_resolver.h | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/packet.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/packet.h | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/streams/stream_service_unix.c | 9 | ||||
-rw-r--r-- | src/libstrongswan/networking/tun_device.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/networking/tun_device.h | 2 |
9 files changed, 14 insertions, 11 deletions
diff --git a/src/libstrongswan/networking/host.c b/src/libstrongswan/networking/host.c index 953720498..110ece894 100644 --- a/src/libstrongswan/networking/host.c +++ b/src/libstrongswan/networking/host.c @@ -3,7 +3,7 @@ * Copyright (C) 2006 Daniel Roethlisberger * Copyright (C) 2005-2006 Martin Willi * Copyright (C) 2005 Jan Hutter - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/libstrongswan/networking/host.h b/src/libstrongswan/networking/host.h index a777f9f97..29283af8e 100644 --- a/src/libstrongswan/networking/host.h +++ b/src/libstrongswan/networking/host.h @@ -3,7 +3,7 @@ * Copyright (C) 2006 Daniel Roethlisberger * Copyright (C) 2005-2008 Martin Willi * Copyright (C) 2005 Jan Hutter - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/libstrongswan/networking/host_resolver.c b/src/libstrongswan/networking/host_resolver.c index bad87e434..580931e1f 100644 --- a/src/libstrongswan/networking/host_resolver.c +++ b/src/libstrongswan/networking/host_resolver.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2012 Tobias Brunner - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/libstrongswan/networking/host_resolver.h b/src/libstrongswan/networking/host_resolver.h index f944a9cdf..d28f3bb27 100644 --- a/src/libstrongswan/networking/host_resolver.h +++ b/src/libstrongswan/networking/host_resolver.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2012 Tobias Brunner - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/libstrongswan/networking/packet.c b/src/libstrongswan/networking/packet.c index f76a85a4b..00993f92b 100644 --- a/src/libstrongswan/networking/packet.c +++ b/src/libstrongswan/networking/packet.c @@ -2,7 +2,7 @@ * Copyright (C) 2012 Tobias Brunner * Copyright (C) 2005-2006 Martin Willi * Copyright (C) 2005 Jan Hutter - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/libstrongswan/networking/packet.h b/src/libstrongswan/networking/packet.h index 8699d4abe..806337ba0 100644 --- a/src/libstrongswan/networking/packet.h +++ b/src/libstrongswan/networking/packet.h @@ -2,7 +2,7 @@ * Copyright (C) 2012 Tobias Brunner * Copyright (C) 2005-2006 Martin Willi * Copyright (C) 2005 Jan Hutter - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/libstrongswan/networking/streams/stream_service_unix.c b/src/libstrongswan/networking/streams/stream_service_unix.c index 1ed27c499..a9b71d6fd 100644 --- a/src/libstrongswan/networking/streams/stream_service_unix.c +++ b/src/libstrongswan/networking/streams/stream_service_unix.c @@ -39,8 +39,9 @@ stream_service_t *stream_service_create_unix(char *uri, int backlog) } if (!lib->caps->check(lib->caps, CAP_CHOWN)) { /* required to chown(2) service socket */ - DBG1(DBG_NET, "socket '%s' requires CAP_CHOWN capability", uri); - return NULL; + DBG1(DBG_NET, "cannot change ownership of socket '%s' without " + "CAP_CHOWN capability. socket directory should be accessible to " + "UID/GID under which the daemon will run", uri); } fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd == -1) @@ -58,7 +59,9 @@ stream_service_t *stream_service_create_unix(char *uri, int backlog) return NULL; } umask(old); - if (chown(addr.sun_path, lib->caps->get_uid(lib->caps), + /* only attempt to chown() socket if we have CAP_CHOWN */ + if (lib->caps->check(lib->caps, CAP_CHOWN) && + chown(addr.sun_path, lib->caps->get_uid(lib->caps), lib->caps->get_gid(lib->caps)) != 0) { DBG1(DBG_NET, "changing socket permissions for '%s' failed: %s", diff --git a/src/libstrongswan/networking/tun_device.c b/src/libstrongswan/networking/tun_device.c index 86951f1e7..3ebeb10ef 100644 --- a/src/libstrongswan/networking/tun_device.c +++ b/src/libstrongswan/networking/tun_device.c @@ -2,7 +2,7 @@ * Copyright (C) 2012 Tobias Brunner * Copyright (C) 2012 Giuliano Grassi * Copyright (C) 2012 Ralf Sager - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * Copyright (C) 2012 Martin Willi * * This program is free software; you can redistribute it and/or modify it diff --git a/src/libstrongswan/networking/tun_device.h b/src/libstrongswan/networking/tun_device.h index 4f9eacb07..798e3275d 100644 --- a/src/libstrongswan/networking/tun_device.h +++ b/src/libstrongswan/networking/tun_device.h @@ -2,7 +2,7 @@ * Copyright (C) 2012 Tobias Brunner * Copyright (C) 2012 Giuliano Grassi * Copyright (C) 2012 Ralf Sager - * Hochschule fuer Technik Rapperswil + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the |