Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Dec 2001 22:54:01 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Mike Barcroft <mike@FreeBSD.org>, Josef Karthauser <joe@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: CVSROOT cfg.pm log_accum.pl 
Message-ID:  <20011202065401.828123810@overcee.netplex.com.au>
In-Reply-To: <p05101005b82f5a88965a@[128.113.24.47]> 

next in thread | previous in thread | raw e-mail | index | archive | help
Garance A Drosihn wrote:
> At 9:43 PM -0500 12/1/01, Mike Barcroft wrote:
> >Josef Karthauser <joe@FreeBSD.org> writes:
> >  >
> >  >   Modified files:
> >>      .                    cfg.pm log_accum.pl
> >>    Log:
> >>    Add the ability to have diffs inserted into the commit email.
> >>
> >  >   Submitted by:   jesper
> >
> >cvs-verbose@FreeBSD.org anyone?  This would lower the barrier to
> >entry for reviewing commits.
> >
> >Best regards,
> >Mike Barcroft
> 
> An alternate possibility:
> 
> Put the diff's for a given commit up as a web page, and have the
> URL to that web page be in the regular commit mail.  This would
> be 'diff -u' output for all the files which changed in a commit,
> which would be more convenient than going thru the CVSweb interface
> to separately pull up the commit to each file.
> 
> If we use a separate mailing list, then I won't want to join the
> mailing list because the vast majority of changes will be ones that
> I do not care about.  But for a few areas (or interesting-sounding
> changes), it would be nice if I could pull up all the diffs for
> everything changed in a commit by just clicking on a URL.

FWIW, this is what the perforce commit logs currently look like.  Note
that there is a http:// link as the very first line for looking up the
atomic change. 

Subject: PERFORCE change 3711 for review
From: Brian Feldman <green@freebsd.org>
Date: Thu, 29 Nov 2001 12:09:45 -0800 (PST)
To: Perforce Change Reviews <perforce@freebsd.org>

http://people.freebsd.org/~peter/p4db/chv.cgi?CH=3711

Change 3711 by green@green_laptop_2 on 2001/11/29 12:09:16

        Make login at least seem to work for _POSIX_CAP systems that
        do not actually have an /etc/capability or capabilities in the
        kernel by ignoring SIGSYS/ENOSYS/ENOENT for capabilities
        functions in libutil.

Affected files ...

... //depot/projects/trustedbsd/cap/lib/libutil/login_class.c#3 edit
... //depot/projects/trustedbsd/cap/lib/libutil/login_pcap.c#2 edit

Differences ...

==== //depot/projects/trustedbsd/cap/lib/libutil/login_class.c#3 (text+ko) ====

@@ -376,9 +376,15 @@

     /* set per-user POSIX.1e capabilities */
     if ((flags & LOGIN_SETPCAP) && setdefpcapcontext(uid) != 0) {
-       syslog(LOG_ERR, "setdefpcap(%s): %m", pwd->pw_name);
-       login_close(llc);
-       return -1;
+       /*
+        * Respect older systems that may not have capabilities
+        * set up.
+        */
+       if (errno != ENOENT && errno != ENOSYS) {
+           syslog(LOG_ERR, "setdefpcap(%s): %m", pwd->pw_name);
+           login_close(llc);
+           return -1;
+       }
     }
 
     /* Set the sessions login */
 
==== //depot/projects/trustedbsd/cap/lib/libutil/login_pcap.c#2 (text+ko) ====
 
@@ -28,6 +28,7 @@
  * POSIX.1e capability context functions.
  */
 #include <sys/types.h>
+#include <sys/signal.h>
 #include <sys/capability.h>
 
 #include <db.h>
@@ -152,8 +153,10 @@
 setdefpcapcontext(uid_t uid)
 {
        cap_t def, max;
+       sig_t osig;
        int rv;

+       osig = signal(SIGSYS, SIG_IGN);
        if (capability_get(uid, &def, &max) != 0)
                return (-1);
        rv = setcapto(def, max);
@@ -170,12 +173,18 @@
 setpcapcontext(uid_t uid, cap_t cap)
 {
        cap_t def, max;
+       sig_t osig;
        int rv = -1;

-       if (capability_get(uid, &def, &max) != 0)
-               return (-1);
+       osig = signal(SIGSYS, SIG_IGN);
+       if (capability_get(uid, &def, &max) != 0) {
+               rv = -1;
+               goto out;
+       }
        rv = setcapto(cap, max);
        cap_free(def);
        cap_free(max);
+out:
+       (void)signal(SIGSYS, osig);
        return (rv);
 }

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011202065401.828123810>