On Mon, Jun 06, 2016 at 06:15:40AM +0200, Sebastien Marie wrote:
> On Mon, Jun 06, 2016 at 12:50:02AM -0300, Gleydson Soares wrote:
> > 
> > - add '# uses pledge()' marker in Makefile (missing in previus)
> > - wrap pledge(2) in #ifdef __OpenBSD__
> 
> ok semarie@

whoops: finally not ok: there are missing braces !

> > Index: patches/sslpatch-ii_c
> > ===================================================================
> > RCS file: patches/sslpatch-ii_c
> > diff -N patches/sslpatch-ii_c
> > --- /dev/null       1 Jan 1970 00:00:00 -0000
> > +++ patches/sslpatch-ii_c   6 Jun 2016 03:45:03 -0000
> > +@@ -511,6 +513,13 @@ int main(int argc, char *argv[]) {
> > +   if(use_ssl)
> > +           port = port == SERVER_PORT ? SSL_SERVER_PORT : port;
> > +   irc = tcpopen(port);
> > ++
> > ++#ifdef __OpenBSD__
> > ++  if (pledge("stdio rpath wpath cpath dpath", NULL) == -1)
> > ++          fputs("ii: pledge\n", stderr);
> > ++          exit(EXIT_FAILURE);
> > ++#endif

fputs + exit should be inside braces.

> > ++
> > +   if(!snprintf(path, sizeof(path), "%s/%s", prefix, host)) {
> > +           fputs("ii: path to irc directory too long\n", stderr);
> > +           exit(EXIT_FAILURE);
> > Index: patches/ucspipatch-ii_c
> > ===================================================================
> > RCS file: patches/ucspipatch-ii_c
> > diff -N patches/ucspipatch-ii_c
> > --- /dev/null       1 Jan 1970 00:00:00 -0000
> > +++ patches/ucspipatch-ii_c 6 Jun 2016 03:45:03 -0000
> > +@@ -455,6 +457,13 @@ int main(int argc, char *argv[]) {
> > +                   default: usage(); break;
> > +           }
> > +   }
> > ++
> > ++#ifdef __OpenBSD__
> > ++  if (pledge("stdio rpath wpath cpath dpath", NULL) == -1)
> > ++          fputs("ii: pledge\n", stderr);
> > ++          exit(EXIT_FAILURE);
> > ++#endif

same here

> > ++
> > +   if(!snprintf(path, sizeof(path), "%s/%s", prefix, host)) {
> > +           fputs("ii: path to irc directory too long\n", stderr);
> > +           exit(EXIT_FAILURE);
> > 
> 
> -- 
> Sebastien Marie

-- 
Sebastien Marie

Reply via email to