Subject: [netatalk-admins] simple patch to allow directories to inherit setgid bit (cont)

From: "John D. Blair" <[email-masked]>
Date: Mon, 04 Jan 1999 23:03:21 +0000

*blush*

I forgot to attach that patch.  Here it is.

 -john.

---------------------------------------------------------------------
John D. Blair                                   [email-masked]
Software Engineer, Cobalt Networks Inc.      http://www.cobaltnet.com
---------------------------------------------------------------------

diff -ur netatalk-1.4b2+asun2.1.2.orig/etc/afpd/appl.c netatalk-1.4b2+asun2.1.2/etc/afpd/appl.c
--- netatalk-1.4b2+asun2.1.2.orig/etc/afpd/appl.c	Thu Dec  3 00:55:51 1998
+++ netatalk-1.4b2+asun2.1.2/etc/afpd/appl.c	Thu Dec 17 18:04:15 1998
@@ -346,9 +346,9 @@
 		return( AFPERR_PARAM );
 	    }
 	    *adt = '\0';
-	    (void) ad_mkdir( dtf, 0777 );
+	    (void) ad_mkdir( dtf, 07777 );
 	    *adt = '/';
-	    (void) ad_mkdir( dtf, 0777 );
+	    (void) ad_mkdir( dtf, 07777 );
 	    *adts = '/';
 
 	    if (( sa.sdt_fd = open( dtf, flags, ad_mode( dtf, mode ))) < 0 ) {
diff -ur netatalk-1.4b2+asun2.1.2.orig/etc/afpd/desktop.c netatalk-1.4b2+asun2.1.2/etc/afpd/desktop.c
--- netatalk-1.4b2+asun2.1.2.orig/etc/afpd/desktop.c	Thu Dec 10 04:46:41 1998
+++ netatalk-1.4b2+asun2.1.2/etc/afpd/desktop.c	Thu Dec 17 18:04:15 1998
@@ -636,9 +636,9 @@
 		return( AFPERR_PARAM );
 	    }
 	    *adt = '\0';
-	    (void) ad_mkdir( dtf, 0777 );
+	    (void) ad_mkdir( dtf, 07777 );
 	    *adt = '/';
-	    (void) ad_mkdir( dtf, 0777 );
+	    (void) ad_mkdir( dtf, 07777 );
 	    *adts = '/';
 
 	    if (( si.sdt_fd = open( dtf, flags, ad_mode( dtf, mode ))) < 0 ) {
diff -ur netatalk-1.4b2+asun2.1.2.orig/libatalk/adouble/ad_open.c netatalk-1.4b2+asun2.1.2/libatalk/adouble/ad_open.c
--- netatalk-1.4b2+asun2.1.2.orig/libatalk/adouble/ad_open.c	Fri Dec 11 03:24:32 1998
+++ netatalk-1.4b2+asun2.1.2/libatalk/adouble/ad_open.c	Thu Dec 17 18:04:15 1998
@@ -202,7 +202,7 @@
 			}
 			*slash = '\0';
 			errno = 0;
-			if ( ad_mkdir( ad_p, 0777 ) < 0 ) {
+			if ( ad_mkdir( ad_p, 07777 ) < 0 ) {
 			    ad_close( ad, adflags );
 			    return( -1 );
 			}