X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftransport%2Fgnunet-helper-transport-wlan.c;h=cbe0dae77ea349b645a2832a1cbb5a051425ba6c;hb=d72d8e05401ace44b57432463f136bcfe55cee03;hp=f4d6db0b9f7da186621b23a24f1db112fa998ce9;hpb=c2d9d1e64c9801122caaa6b429fc67706db5c9d7;p=oweals%2Fgnunet.git diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index f4d6db0b9..cbe0dae77 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /** * @file src/transport/gnunet-helper-transport-wlan.c @@ -1923,23 +1923,28 @@ main (int argc, char *argv[]) int stdin_open; struct MessageStreamTokenizer *stdin_mst; int raw_eno; - uid_t uid; /* assert privs so we can modify the firewall rules! */ - uid = getuid (); -#ifdef HAVE_SETRESUID - if (0 != setresuid (uid, 0, 0)) { - fprintf (stderr, "Failed to setresuid to root: %s\n", strerror (errno)); - return 254; - } +#ifdef HAVE_SETRESUID + uid_t uid = getuid (); + + if (0 != setresuid (uid, 0, 0)) + { + fprintf (stderr, + "Failed to setresuid to root: %s\n", + strerror (errno)); + return 254; + } #else - if (0 != seteuid (0)) - { - fprintf (stderr, "Failed to seteuid back to root: %s\n", strerror (errno)); - return 254; - } + if (0 != seteuid (0)) + { + fprintf (stderr, + "Failed to seteuid back to root: %s\n", strerror (errno)); + return 254; + } #endif + } /* make use of SGID capabilities on POSIX */ memset (&dev, 0, sizeof (dev));