SOURCES: ncpfs-2.2.6-align.patch (NEW), ncpfs-2.2.6-getuid.patch (...

pascalek pascalek at pld-linux.org
Fri Jun 15 23:27:55 CEST 2007


Author: pascalek                     Date: Fri Jun 15 21:27:55 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
SOURCES:
   ncpfs-2.2.6-align.patch (NONE -> 1.1)  (NEW), ncpfs-2.2.6-getuid.patch (NONE -> 1.1)  (NEW), ncpfs-2.2.6-ldconfig.patch (NONE -> 1.1)  (NEW), ncpfs-2.2.6-offsetof.patch (NONE -> 1.1)  (NEW), ncpfs-2.2.6.tar.gz (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/ncpfs-2.2.6-align.patch
diff -u /dev/null SOURCES/ncpfs-2.2.6-align.patch:1.1
--- /dev/null	Fri Jun 15 23:27:55 2007
+++ SOURCES/ncpfs-2.2.6-align.patch	Fri Jun 15 23:27:50 2007
@@ -0,0 +1,11 @@
+--- ncpfs-2.2.6/lib/ndslib.c.olddd	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/lib/ndslib.c	2006-04-11 11:35:15.000000000 +0200
+@@ -957,7 +957,7 @@
+ 	NWDSCCODE err;
+ 	int n1, n3;
+ 	u_int16_t n3a;
+-	char rpb_b[DEFAULT_MESSAGE_LEN];
++	char rpb_b[DEFAULT_MESSAGE_LEN] __attribute__ ((aligned (4)));
+ 	Buf_T rpb;
+     	size_t k1tl;
+     

================================================================
Index: SOURCES/ncpfs-2.2.6-getuid.patch
diff -u /dev/null SOURCES/ncpfs-2.2.6-getuid.patch:1.1
--- /dev/null	Fri Jun 15 23:27:55 2007
+++ SOURCES/ncpfs-2.2.6-getuid.patch	Fri Jun 15 23:27:50 2007
@@ -0,0 +1,118 @@
+--- ncpfs-2.2.6/contrib/tcl-utils/ncplist.c.getuid	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/contrib/tcl-utils/ncplist.c	2005-11-11 14:37:41.000000000 +0100
+@@ -299,7 +299,12 @@
+         }else {
+ 
+                 if (!treeName[0]) {
+-                         NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++                         dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++                         if (dserr){
++                            fprintf(stderr, "failed: Cannot get preffered DS tree: %s\n",
++                                    strnwerror(dserr);
++			    exit(106);
++			 }
+ 
+                 }
+                 if (!treeName[0]) {
+--- ncpfs-2.2.6/contrib/tcl-utils/chgpwd.c.getuid	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/contrib/tcl-utils/chgpwd.c	2005-11-11 14:37:41.000000000 +0100
+@@ -292,12 +292,12 @@
+ 	        }
+         } else {
+                 if (!treeName[0]) {
+-                         NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++                         dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
+ 
+                 }
+                 if (!treeName[0]) {
+                         fprintf(stderr,"failed: You must specify a server or a tree\n");
+-                        dserr=114;
++                        /*dserr=114;*/
+                         goto finished;
+                 }
+ 
+--- ncpfs-2.2.6/contrib/tcl-utils/ncpreadprops.c.getuid	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/contrib/tcl-utils/ncpreadprops.c	2005-11-11 14:37:41.000000000 +0100
+@@ -507,7 +507,7 @@
+             }
+         } else {
+                 if (!treeName[0]) {
+-                         NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++                         dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
+ 
+                 }
+                 if (!treeName[0]) {
+--- ncpfs-2.2.6/contrib/tcl-utils/ncpreadprop.c.getuid	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/contrib/tcl-utils/ncpreadprop.c	2005-11-11 14:37:41.000000000 +0100
+@@ -470,7 +470,7 @@
+             }
+         } else {
+                 if (!treeName[0]) {
+-                         NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++                         dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
+ 
+                 }
+                 if (!treeName[0]) {
+--- ncpfs-2.2.6/sutil/ncplogin.c.getuid	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/sutil/ncplogin.c	2005-11-11 14:37:30.000000000 +0100
+@@ -588,7 +588,10 @@
+ 		int flags = 0;
+ 
+ 		if (!info.tree) {
+-			NWCXGetPreferredDSTree(ntree, sizeof(ntree));
++			err=NWCXGetPreferredDSTree(ntree, sizeof(ntree));
++			if (err){
++			   errexit(104, _("Cannot get preffered DS tree: %s\n"),strnwerror(err));
++			}
+ 			info.tree = ntree;
+ 		}
+ 
+--- ncpfs-2.2.6/lib/nwclient.c.getuid	2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6/lib/nwclient.c	2005-11-11 14:37:41.000000000 +0100
+@@ -481,6 +481,10 @@
+                 *err = EACCES;
+                 return NULL;
+         }
++        if (st.st_uid != getuid()) {
++                *err = EACCES;
++                return NULL;
++        }
+         if ((st.st_mode & (S_IRWXO | S_IRWXG)) != 0) {
+                 *err = NCPLIB_INVALID_MODE;
+                 return NULL;
+@@ -560,7 +564,7 @@
+   if (!res)
+         res=readnwinfosfile (NULL,NDS_PREFERRED_TREE,NULL, &err);
+   if (!res)
+-    return -1;
++    return err;
+   if (strlen (res)+1 >maxLen)
+      return NWE_BUFFER_OVERFLOW;
+   strcpy(preferTree,res);
+@@ -581,7 +585,7 @@
+    if (!res)
+         res=readnwinfosfile (NULL,NDS_PREFERRED_NAME_CTX,forTree,&err);
+   if (!res)
+-    return -1;
++    return err;
+   if (strlen (res)+1 >maxLen)
+      return NWE_BUFFER_OVERFLOW;
+   strcpy(nameContext,res);
+@@ -603,7 +607,7 @@
+ 
+ 		res=readnwinfosfile (NULL, NDS_PREFERRED_SERVER, forTree, &err);
+ 		if (!res) {
+-			return -1;
++			return err;
+ 		}
+ 	}
+ 	/* test that this server DO belongs to tree forTree*/
+@@ -644,7 +648,7 @@
+          if (!res)
+                 res=readnwinfosfile (NULL,NDS_USER,forTree, &err);
+          if (!res)
+-                return -1;
++                return err;
+         if (strlen (res)+1 >maxLen)
+                 return NWE_BUFFER_OVERFLOW;
+         strcpy(defaultName,res);

================================================================
Index: SOURCES/ncpfs-2.2.6-ldconfig.patch
diff -u /dev/null SOURCES/ncpfs-2.2.6-ldconfig.patch:1.1
--- /dev/null	Fri Jun 15 23:27:55 2007
+++ SOURCES/ncpfs-2.2.6-ldconfig.patch	Fri Jun 15 23:27:50 2007
@@ -0,0 +1,11 @@
+--- ncpfs-2.2.6/lib/Makefile.in.ld	2005-11-14 12:25:57.000000000 +0100
++++ ncpfs-2.2.6/lib/Makefile.in	2005-11-14 12:25:57.000000000 +0100
+@@ -98,7 +98,7 @@
+ install_shared: $(SHARED_NCPLIB_BIN)
+ 	$(INSTALL) -d $(DESTDIR)$(libsodir)
+ 	$(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)
+-	-ldconfig
++	/sbin/ldconfig -n $(DESTDIR)$(libsodir)
+ 
+ install-dev: install_shared install_static
+ 	ln -sf $(SHARED_NCPLIB_SONAME) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB)

================================================================
Index: SOURCES/ncpfs-2.2.6-offsetof.patch
diff -u /dev/null SOURCES/ncpfs-2.2.6-offsetof.patch:1.1
--- /dev/null	Fri Jun 15 23:27:55 2007
+++ SOURCES/ncpfs-2.2.6-offsetof.patch	Fri Jun 15 23:27:50 2007
@@ -0,0 +1,10 @@
+--- ncpfs-2.2.6/sutil/ncpm_common.c.offsetof	2006-11-09 04:54:28.000000000 +0100
++++ ncpfs-2.2.6/sutil/ncpm_common.c	2006-11-09 04:54:36.000000000 +0100
+@@ -82,6 +82,7 @@
+ 
+ #include "ncpm_common.h"
+ 
++#include <stddef.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <signal.h>

================================================================
Index: SOURCES/ncpfs-2.2.6.tar.gz
<<Binary file>>
================================================================


More information about the pld-cvs-commit mailing list