[vlc-devel] [PATCH] rootwrap: fix warning

Lyndon Brown jnqnfe at gmail.com
Mon Sep 28 18:48:45 CEST 2020


Ah, not a problem of not reading the manual, I think I copied and
pasted the two lines below rather than typing it, and only made two of
the necessary adjustments afterwards, forgetting to remove the '!'.
Apologies. Fixed copy attached.
On Mon, 2020-09-28 at 10:06 +0300, Rémi Denis-Courmont wrote:
> Hi,
> 
> This patch is just plain wrong. RTFM.
> 
> Le 28 septembre 2020 02:36:27 GMT+03:00, Lyndon Brown <
> jnqnfe at gmail.com> a écrit :
> > attached. preview:
> > 
> > From: Lyndon Brown <jnqnfe at gmail.com>
> > Date: Sat, 30 Mar 2019 02:43:45 +0000
> > Subject: rootwrap: fix warning
> > 
> > 
> > diff --git a/bin/rootwrap.c b/bin/rootwrap.c
> > index 0258773b90..3de054e73a 100644
> > --- a/bin/rootwrap.c
> > +++ b/bin/rootwrap.c
> > @@ -248,7 +248,8 @@ int main (int argc, char *argv[])
> >          fputs("Cannot determine unprivileged user for VLC!\n",
> > stderr);
> >          exit (1);
> >      }
> > -    setuid (uid);
> > +    if (!setuid (uid))
> > +        exit (1);
> >  
> >      if (!setuid (0)) /* sanity check: we cannot get root back */
> >          exit (1);
> 
> _______________________________________________vlc-devel mailing
> listTo unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200928/9a9e3a1c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rootwrap_v2.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200928/9a9e3a1c/attachment.bin>


More information about the vlc-devel mailing list