[leafnode-list] Re: Spool permissions in leafnode-2

Matthias Andree matthias.andree at gmx.de
Wed Apr 8 23:36:33 CEST 2009


Sorry - resending with proper MIME type so that the attachment doesn't
get stripped from the list. Graphical mailers /=(Q/$O"§L Grmbl - this
is plain US-ASCII, why the f* is this marked "application/octet-stream"?


Am 08.04.2009, 22:58 Uhr, schrieb Matthias Andree <matthias.andree at gmx.de>:

> Hm - I was under the impression we're doing that already (actually 0660 &
> ~umask), but indeed it's 0600. That's unintentional, but will likely need
> a fix in several places.

Me again-

seems fixing one place is sufficient.

Please try the attached patch (i. e. save the attachment and use it as
input for patch. Do not copy & paste, this is unlikely to work).
I hope it applies not only to the latest snapshot, but also older ones.

(The commit ID is from the master branch:)

commit 5585d7c6002eb3972ea34a41c9b3c4ac9d9dd696
Author: Matthias Andree <matthias.andree at gmx.de>
Date:   Wed Apr 8 23:22:33 2009 +0200

       Create articles with mode 0660.

       Reported by Adam Funk.

diff --git a/store.c b/store.c
index ea366a9..251d84e 100644
--- a/store.c
+++ b/store.c
@@ -382,6 +382,9 @@ store_stream(FILE * in /** input file */ ,
    		    /* ls = !sync_link(tmpfn, nb); */
    		    ls = !link(mastr_str(tmpfn), nb);
    		    if (ls) {
+			if (log_chmod(nb, 0660) < 0) {
+				ls = -1;
+			}
    			/*@innerbreak@*/ break;
    		    }
    		    if (errno == EEXIST) {

-- 
Matthias Andree
-------------- next part --------------
commit 5585d7c6002eb3972ea34a41c9b3c4ac9d9dd696
Author: Matthias Andree <matthias.andree at gmx.de>
Date:   Wed Apr 8 23:22:33 2009 +0200

    Create articles with mode 0660.
    
    Reported by Adam Funk.

diff --git a/store.c b/store.c
index ea366a9..251d84e 100644
--- a/store.c
+++ b/store.c
@@ -382,6 +382,9 @@ store_stream(FILE * in /** input file */ ,
 		    /* ls = !sync_link(tmpfn, nb); */
 		    ls = !link(mastr_str(tmpfn), nb);
 		    if (ls) {
+			if (log_chmod(nb, 0660) < 0) {
+				ls = -1;
+			}
 			/*@innerbreak@*/ break;
 		    }
 		    if (errno == EEXIST) {


More information about the leafnode-list mailing list