summaryrefslogtreecommitdiff
path: root/net/rumba/patches
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>1998-04-26 09:32:56 +0000
committertron <tron@pkgsrc.org>1998-04-26 09:32:56 +0000
commit1bef3ce69a74d72867073def443a186e6ded87aa (patch)
tree0ed651971ff31ce41fb3b33eb172dcf4c6eb5764 /net/rumba/patches
parent7595c3dcae852fe388b06f572342355b3de53eed (diff)
downloadpkgsrc-1bef3ce69a74d72867073def443a186e6ded87aa.tar.gz
Initial import of FreeBSD's "rumba" port.
Diffstat (limited to 'net/rumba/patches')
-rw-r--r--net/rumba/patches/patch-aa22
-rw-r--r--net/rumba/patches/patch-ab148
-rw-r--r--net/rumba/patches/patch-ac177
-rw-r--r--net/rumba/patches/patch-ad46
-rw-r--r--net/rumba/patches/patch-ae66
-rw-r--r--net/rumba/patches/patch-af71
-rw-r--r--net/rumba/patches/patch-ag99
-rw-r--r--net/rumba/patches/patch-ah34
-rw-r--r--net/rumba/patches/patch-ai12
-rw-r--r--net/rumba/patches/patch-aj29
10 files changed, 704 insertions, 0 deletions
diff --git a/net/rumba/patches/patch-aa b/net/rumba/patches/patch-aa
new file mode 100644
index 00000000000..f298c6ee686
--- /dev/null
+++ b/net/rumba/patches/patch-aa
@@ -0,0 +1,22 @@
+*** ../rumba.0.4.s/./my_include/asm/types.h Thu Jan 2 17:25:14 1997
+--- ./my_include/asm/types.h Sun Jun 15 02:46:57 1997
+***************
+*** 8,15 ****
+
+ extern int printk(const char *format, ...);
+
+!
+! typedef unsigned short mode_t;
+
+ typedef signed char s8;
+ typedef signed char __s8;
+--- 8,16 ----
+
+ extern int printk(const char *format, ...);
+
+! #if BYTE_ORDER==LITTLE_ENDIAN
+! #define __LITTLE_ENDIAN__
+! #endif
+
+ typedef signed char s8;
+ typedef signed char __s8;
diff --git a/net/rumba/patches/patch-ab b/net/rumba/patches/patch-ab
new file mode 100644
index 00000000000..d86d94dddc0
--- /dev/null
+++ b/net/rumba/patches/patch-ab
@@ -0,0 +1,148 @@
+*** nfs/syscalls.c.orig Thu Jan 16 20:55:59 1997
+--- nfs/syscalls.c Tue Jul 1 13:18:52 1997
+***************
+*** 21,27 ****
+ #ifdef NeXT
+ # include <nfs/nfs_mount.h>
+ int syscall_mount(char *dir, void *root_fh, int sock_fd,
+! struct sockaddr_in *socket)
+ {
+ struct nfs_args nfs_args;
+
+--- 21,27 ----
+ #ifdef NeXT
+ # include <nfs/nfs_mount.h>
+ int syscall_mount(char *dir, void *root_fh, int sock_fd,
+! struct sockaddr_in *socket, char* mntfrom)
+ {
+ struct nfs_args nfs_args;
+
+***************
+*** 39,50 ****
+ nfs_args.netname = "net";
+ return mount(MOUNT_NFS, dir, 0, (caddr_t)&nfs_args);
+ }
+ #endif
+ /* ------------------------------------------------------------------------- */
+ #ifdef linux
+ # include <linux/nfs_mount.h>
+ int syscall_mount(char *dir, void *root_fh, int sock_fd,
+! struct sockaddr_in *sockaddr)
+ {
+ struct nfs_mount_data nfs_args;
+ int ksock, kport;
+--- 39,139 ----
+ nfs_args.netname = "net";
+ return mount(MOUNT_NFS, dir, 0, (caddr_t)&nfs_args);
+ }
++
++ int syscall_unmount(char* dir)
++ {
++ unmount(dir);
++ }
++ #endif
++ /* ------------------------------------------------------------------------- */
++ #ifdef BSD4_4
++ #define NFSX_V2FH 32
++ #ifdef BSD4_4_LITE2
++ #include <nfs/rpcv2.h>
++ #include <nfs/nfs.h>
++ #endif
++ int syscall_mount(char *dir, void *root_fh, int sock_fd,
++ struct sockaddr_in *socket, char* mntfrom)
++ {
++ struct nfs_args nfs_args;
++ #ifdef __FreeBSD__
++ #ifdef _NEW_VFSCONF
++ struct vfsconf vfc;
++ int error;
++ #else
++ struct vfsconf* vfc;
++ #endif
++ #endif
++
++ bzero(&nfs_args, sizeof(nfs_args));
++ #ifdef BSD4_4_LITE2
++ nfs_args.version = NFS_ARGSVERSION;
++ #endif
++ nfs_args.wsize = 8192;
++ nfs_args.rsize = 8192;
++ nfs_args.retrans = 0;
++ nfs_args.timeo = 100; /* 10s timeout */
++ nfs_args.addr = (struct sockaddr*)socket;
++ nfs_args.addrlen = sizeof(*socket);
++ nfs_args.sotype = SOCK_DGRAM;
++ nfs_args.flags = NFSMNT_SOFT |
++ NFSMNT_RETRANS | NFSMNT_TIMEO |
++ NFSMNT_WSIZE | NFSMNT_RSIZE;
++ nfs_args.fh = (char *)root_fh;
++ nfs_args.fhsize = NFSX_V2FH;
++ nfs_args.hostname = mntfrom;
++ #ifdef BSD4_4_LITE2
++ #define NFSNAME "nfs"
++ #else
++ #define NFSNAME MOUNT_NFS
++ #endif
++ #ifdef __FreeBSD__
++ #ifdef _NEW_VFSCONF
++ #define GETVFSBYNAME error = getvfsbyname("nfs", &vfc)
++ #define VFCERROR error
++ #define VFCNFSNAME vfc.vfc_name
++ #else
++ #define GETVFSBYNAME vfc = getvfsbyname("nfs")
++ #define VFCERROR !vfc
++ #define VFCNFSNAME vfc->vfc_index
++ #endif
++ GETVFSBYNAME;
++ if (VFCERROR && vfsisloadable("nfs")) {
++ if(vfsload("nfs"))
++ return -1;
++ endvfsent(); /* clear cache */
++ GETVFSBYNAME;
++ }
++ if (VFCERROR)
++ return -1;
++ return mount(VFCNFSNAME, dir, 0, &nfs_args);
++ #else
++ return mount(NFSNAME, dir, 0, &nfs_args);
++ #endif
++ }
++
++ int syscall_unmount(char* dir)
++ {
++ struct statfs* mntbuf;
++ int count, i;
++
++ if ((count = getmntinfo(&mntbuf, MNT_NOWAIT)) < 0)
++ return -1;
++ for (i=0; i<count; i++) {
++ if (strcmp(mntbuf[i].f_mntonname, dir) == 0) {
++ return unmount(dir,0);
++ }
++ }
++ errno = ENOENT;
++ return -1;
++ }
++
+ #endif
+ /* ------------------------------------------------------------------------- */
+ #ifdef linux
+ # include <linux/nfs_mount.h>
+ int syscall_mount(char *dir, void *root_fh, int sock_fd,
+! struct sockaddr_in *sockaddr, char* mntfrom)
+ {
+ struct nfs_mount_data nfs_args;
+ int ksock, kport;
+***************
+*** 92,97 ****
+--- 181,190 ----
+ exit(1);
+ }
+ return mount("rumba:/", dir, "nfs", 0xc0ed0000, &nfs_args);
++ }
++ int syscall_unount(char* dir)
++ {
++ umount(dir);
+ }
+ #endif
+ /* ------------------------------------------------------------------------- */
diff --git a/net/rumba/patches/patch-ac b/net/rumba/patches/patch-ac
new file mode 100644
index 00000000000..8f5fe534eee
--- /dev/null
+++ b/net/rumba/patches/patch-ac
@@ -0,0 +1,177 @@
+*** ../rumba.0.4.s/./nfs/mount.c Thu Jan 16 20:31:24 1997
+--- ./nfs/mount.c Tue Jun 17 00:14:51 1997
+***************
+*** 14,20 ****
+--- 14,22 ----
+ #include "nfs_prot.h"
+ #include <netdb.h>
+ #include <arpa/inet.h>
++ #ifdef DEAL_WITH_MTAB
+ #include <mntent.h>
++ #endif
+ #include "my_defines.h"
+
+ #define DPRINTF(arg) if(debug_mode & DEBUG_NFS) dprintf arg
+***************
+*** 24,30 ****
+--- 26,34 ----
+ static int do_exit = 0;
+ static int do_nfsumount = 0;
+
++ #ifdef DEAL_WITH_MTAB
+ #define MTAB_TMP (MOUNTED ".tmp")
++ #endif
+
+ /* ------------------------------------------------------------------------- */
+
+***************
+*** 37,47 ****
+
+ static void nfs_unmount(void)
+ {
+ FILE *fpout, *fpin;
+ struct mntent *ent;
+
+ dprintf("Going to unmount NFS...\n");
+! while(unmount(mntdir)){
+ if(errno != ENOENT)
+ my_perror(mntdir);
+ if(errno != EBUSY){
+--- 41,53 ----
+
+ static void nfs_unmount(void)
+ {
++ #ifdef DEAL_WITH_MTAB
+ FILE *fpout, *fpin;
+ struct mntent *ent;
++ #endif
+
+ dprintf("Going to unmount NFS...\n");
+! while(syscall_unmount(mntdir)){
+ if(errno != ENOENT)
+ my_perror(mntdir);
+ if(errno != EBUSY){
+***************
+*** 49,54 ****
+--- 55,61 ----
+ }
+ sleep(1);
+ }
++ #ifdef DEAL_WITH_MTAB
+ /* update mtab */
+ if((fpout = setmntent(MTAB_TMP, "w")) == NULL){
+ my_perror(MTAB_TMP);
+***************
+*** 68,73 ****
+--- 75,81 ----
+ unlink(MTAB_TMP);
+ }
+ }
++ #endif
+ dprintf("NFS unmounted.\n");
+ }
+
+***************
+*** 130,136 ****
+
+ void mount_and_dispatch(char *dir, void (*proc)(), void *root_fh, int bg)
+ {
+! int sock, port, child_pid, parent_pid, other_pid;
+ struct sockaddr_in sain;
+ SVCXPRT *nfsxprt;
+ int bufsiz = 0xc000; /* room for a few biods */
+--- 138,144 ----
+
+ void mount_and_dispatch(char *dir, void (*proc)(), void *root_fh, int bg)
+ {
+! int sock, child_pid, parent_pid, other_pid;
+ struct sockaddr_in sain;
+ SVCXPRT *nfsxprt;
+ int bufsiz = 0xc000; /* room for a few biods */
+***************
+*** 162,180 ****
+ if(setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&bufsiz,sizeof(bufsiz)))
+ my_perror("setsockopt");
+
+- /* Bind it to a reserved port */
+ sain.sin_family = AF_INET;
+! sain.sin_addr.s_addr = inet_addr("127.0.0.1");
+! for(port = IPPORT_RESERVED-1; port > IPPORT_RESERVED/2; port--){
+! DPRINTF(("trying to use port %d\n", port));
+! sain.sin_port = htons(port);
+! if(bind(sock, (struct sockaddr *) &sain, sizeof(sain)) >= 0)
+! break;
+ }
+! dprintf("Using port %d for NFS.\n", port);
+! if(port <= IPPORT_RESERVED/2){
+! my_perror("bind to reserved port"); exit(1);
+! }
+ if((nfsxprt = svcudp_create(sock)) == 0){
+ my_perror("svcudp_create"); exit(1);
+ }
+--- 170,186 ----
+ if(setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&bufsiz,sizeof(bufsiz)))
+ my_perror("setsockopt");
+
+ sain.sin_family = AF_INET;
+! sain.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+! if (bind(sock, (struct sockaddr*) &sain, sizeof(sain)) >= 0) {
+! int namelen=sizeof(sain);
+! if (getsockname(sock, (struct sockaddr*) &sain, &namelen) <0) {
+! my_perror("getsockname"); exit(1);
+! }
+! } else {
+! my_perror("bind"); exit(1);
+ }
+! dprintf("Using port %d for NFS.\n", ntohs(sain.sin_port));
+ if((nfsxprt = svcudp_create(sock)) == 0){
+ my_perror("svcudp_create"); exit(1);
+ }
+***************
+*** 198,214 ****
+ if((child_pid == 0 && bg) || (child_pid != 0 && !bg)){
+ dispatch_loop();
+ }else{
+ DPRINTF(("Going to mount...\n"));
+ other_pid = child_pid == 0 ? parent_pid : child_pid;
+! if(syscall_mount(dir, root_fh, sock, &sain) < 0){
+ eprintf("nfs mount %s: [%d] %s\n", dir, errno, strerror(errno));
+ kill(other_pid, SIGKILL);
+ }else{
+ FILE *fp;
+ struct mntent mnt;
+- char fsname[256];
+
+- sprintf(fsname, "rumba-%d", other_pid);
+ mnt.mnt_fsname = fsname;
+ mnt.mnt_dir = mntdir;
+ mnt.mnt_type = "nfs";
+--- 204,221 ----
+ if((child_pid == 0 && bg) || (child_pid != 0 && !bg)){
+ dispatch_loop();
+ }else{
++ char fsname[256];
+ DPRINTF(("Going to mount...\n"));
+ other_pid = child_pid == 0 ? parent_pid : child_pid;
+! sprintf(fsname, "rumba-%d", other_pid);
+! if(syscall_mount(dir, root_fh, sock, &sain, fsname) < 0){
+ eprintf("nfs mount %s: [%d] %s\n", dir, errno, strerror(errno));
+ kill(other_pid, SIGKILL);
+ }else{
++ #ifdef DEAL_WITH_MTAB
+ FILE *fp;
+ struct mntent mnt;
+
+ mnt.mnt_fsname = fsname;
+ mnt.mnt_dir = mntdir;
+ mnt.mnt_type = "nfs";
+***************
+*** 219,224 ****
+--- 226,232 ----
+ else
+ my_perror(MOUNTED);
+ endmntent(fp);
++ #endif
+ }
+ exit(0);
+ }
diff --git a/net/rumba/patches/patch-ad b/net/rumba/patches/patch-ad
new file mode 100644
index 00000000000..b93d35c1c24
--- /dev/null
+++ b/net/rumba/patches/patch-ad
@@ -0,0 +1,46 @@
+--- Makefile.orig Mon Feb 10 13:30:00 1997
++++ Makefile Tue Jul 15 15:54:21 1997
+@@ -17,16 +17,21 @@
+ ##############################################################################
+
+ # For NEXTSTEP/OPENSTEP:
+-CFLAGS = -Wall -O2 -traditional-cpp -g
+-INCLUDES = -I$(MYINCL) -I$(INCL)
++#CFLAGS = -Wall -O2 -traditional-cpp -g
++#INCLUDES = -I$(MYINCL) -I$(INCL)
+ # put your architecture here:
+-ARCH = -arch i386
+-THE_CC = cc
++#ARCH = -arch i386
++#THE_CC = cc
+
+ # For Linux:
+ #CFLAGS = -Wall -O2 -g
+ #INCLUDES = -I$(INCL)
+
++# For FreeBSD
++CFLAGS = -Wall -O2
++INCLUDES = -I$(MYINCL) -I$(INCL)
++THE_CC = cc
++
+ ##############################################################################
+ ######################## End of system specific part #########################
+ ##############################################################################
+@@ -38,7 +43,7 @@
+ OFILES = proc.o sock.o rumba.o psinode.o kernel.o smb_abstraction.o fo_nfs.o
+
+ .c.o:
+- $(CC) $(CFLAGS) $(ARCH) -c -o $*.o $<
++ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ all: $(NAME)
+
+@@ -46,7 +51,7 @@
+ $(MAKE) -C nfs
+
+ $(NAME): $(OFILES) nfs_dir
+- $(CC) $(ARCH) -o $(NAME) $(OFILES) nfs/nfs.o
++ $(CC) -o $(NAME) $(OFILES) nfs/nfs.o
+
+ clean:
+ rm -f $(OFILES)
diff --git a/net/rumba/patches/patch-ae b/net/rumba/patches/patch-ae
new file mode 100644
index 00000000000..38e7e931a79
--- /dev/null
+++ b/net/rumba/patches/patch-ae
@@ -0,0 +1,66 @@
+*** ../rumba.0.4.s/./syshdr.h Fri Jan 3 19:24:59 1997
+--- ./syshdr.h Sun Jun 15 14:19:57 1997
+***************
+*** 19,26 ****
+--- 19,43 ----
+ #include <sys/errno.h>
+ #include <errno.h>
+ #include <sys/param.h>
++
++ #ifdef __FreeBSD__
++ #include <osreldate.h>
++ #if __FreeBSD_version >= 300000
++ #define BSD4_4_LITE2
++ #endif
++ #endif
++ #if defined(BSD4_4) && !defined(BSD4_4_LITE2)
++ #define BSD4_4_LITE
++ #endif
++
+ #include <sys/stat.h>
+ #include <signal.h>
++ #ifdef BSD4_4
++ #define NFS
++ #endif
++ #ifdef BSD4_4_LITE2
++ #define _NEW_VFSCONF
++ #endif
+ #include <sys/mount.h>
+ #include <stdarg.h>
+ /*
+***************
+*** 30,39 ****
+ /* ------------------------------------------------------------------------- */
+ #ifdef NeXT
+ # include <libc.h>
+ #endif
+ /* ------------------------------------------------------------------------- */
+ #ifdef linux
+! # define unmount umount
+ #endif
+ /* ------------------------------------------------------------------------- */
+ /*
+--- 47,57 ----
+ /* ------------------------------------------------------------------------- */
+ #ifdef NeXT
+ # include <libc.h>
++ # define DEAL_WITH_MTAB
+ #endif
+ /* ------------------------------------------------------------------------- */
+ #ifdef linux
+! # define DEAL_WITH_MTAB
+ #endif
+ /* ------------------------------------------------------------------------- */
+ /*
+***************
+*** 41,44 ****
+ */
+ struct sockaddr_in; /* possibly not defined in any header... */
+ extern int syscall_mount(char *dir, void *root_fh, int sock_fd,
+! struct sockaddr_in *socket);
+--- 59,63 ----
+ */
+ struct sockaddr_in; /* possibly not defined in any header... */
+ extern int syscall_mount(char *dir, void *root_fh, int sock_fd,
+! struct sockaddr_in *socket, char* fsname);
+! extern int syscall_unmount(char* dir);
diff --git a/net/rumba/patches/patch-af b/net/rumba/patches/patch-af
new file mode 100644
index 00000000000..cd0bf82e49d
--- /dev/null
+++ b/net/rumba/patches/patch-af
@@ -0,0 +1,71 @@
+*** ../rumba.0.4.s/./rumba.c Mon Feb 10 15:08:50 1997
+--- ./rumba.c Sun Jun 15 14:17:02 1997
+***************
+*** 216,222 ****
+ struct passwd *pwd;
+ struct group *grp;
+ char mountpoint_abs[MAXPATHLEN + 1];
+- char hostname[MAXHOSTNAMELEN + 1];
+ struct hostent *h;
+ int got_password, upcase_password;
+ int port = -1, max_xmit = -1;
+--- 216,221 ----
+***************
+*** 231,237 ****
+ got_password = 0;
+ upcase_password = 1;
+ run_as_daemon = 1;
+- memset(hostname, 0, sizeof(hostname));
+ if(argc < 2 || (argc == 2 && strcmp(argv[1], "-h") == 0)){
+ help();
+ exit(0);
+--- 230,235 ----
+***************
+*** 239,248 ****
+ if(argc == 2 && strcmp(argv[1], "-v") == 0){
+ print_version();
+ }
+! gethostname(hostname, MAXHOSTNAMELEN);
+ if (geteuid() != 0) {
+ eprintf("%s must be installed suid root\n", progname);
+ }
+ mount_point = argv[2];
+ if(extract_service(argv[1], &server, &share, &root, &user_dummy) != 0) {
+ usage();
+--- 237,247 ----
+ if(argc == 2 && strcmp(argv[1], "-v") == 0){
+ print_version();
+ }
+! #ifndef BSD4_4_LITE2
+ if (geteuid() != 0) {
+ eprintf("%s must be installed suid root\n", progname);
+ }
++ #endif
+ mount_point = argv[2];
+ if(extract_service(argv[1], &server, &share, &root, &user_dummy) != 0) {
+ usage();
+***************
+*** 393,398 ****
+--- 392,403 ----
+ password, max_xmit, port) != 0){
+ exit(1);
+ }
++ #ifdef BSD4_4
++ if (realpath(mount_point, mountpoint_abs) == NULL) {
++ perror(mount_point);
++ exit (1);
++ }
++ #else
+ if(*mount_point == '/'){ /* absolute path given? */
+ strcpy(mountpoint_abs, mount_point);
+ }else{
+***************
+*** 403,408 ****
+--- 408,414 ----
+ }
+ strcat(mountpoint_abs, mount_point);
+ }
++ #endif
+ mount_and_dispatch(mountpoint_abs, nfs_dispatch, root_fh, run_as_daemon);
+ return 0;
+ }
diff --git a/net/rumba/patches/patch-ag b/net/rumba/patches/patch-ag
new file mode 100644
index 00000000000..18d76e47bd0
--- /dev/null
+++ b/net/rumba/patches/patch-ag
@@ -0,0 +1,99 @@
+*** smb_abstraction.c.orig Wed Feb 5 16:50:50 1997
+--- smb_abstraction.c Sat Jul 5 20:50:15 1997
+***************
+*** 118,123 ****
+--- 118,128 ----
+ memset(&data, 0, sizeof(struct smb_mount_data));
+ memset(hostname, 0, sizeof(hostname));
+ gethostname(hostname, MAXHOSTNAMELEN);
++ {
++ char* s=strchr(hostname, '.');
++ if (s)
++ *s=0;
++ }
+
+ if((h = gethostbyname(p->server_ipname)) == NULL){
+ eprintf("%s: unknown host\n", p->server_ipname);
+***************
+*** 133,147 ****
+--- 138,159 ----
+ }
+ data.version = SMB_MOUNT_VERSION;
+ strncpy(data.service, p->service, sizeof(data.service));
++ data.service[sizeof(data.service)-1] = 0;
++ str_upper(data.service);
+ strncpy(data.root_path, p->root_path, sizeof(data.root_path));
++ data.root_path[sizeof(data.root_path)-1] = 0;
+ strncpy(data.username, p->username, sizeof(data.username));
++ data.username[sizeof(data.username)-1] = 0;
+ strncpy(data.password, p->password, sizeof(data.password));
++ data.password[sizeof(data.password)-1] = 0;
+ if(p->max_xmit > 0)
+ data.max_xmit = p->max_xmit;
+ else
+ data.max_xmit = 4070;
+ strncpy(data.server_name, p->server_name, sizeof(data.server_name));
++ data.server_name[sizeof(data.server_name)-1]=0;
+ strncpy(data.client_name, p->client_name, sizeof(data.client_name));
++ data.client_name[sizeof(data.client_name)-1]=0;
+
+ if(data.server_name[0] == 0){
+ if(strlen(p->server_ipname) > 16){
+***************
+*** 150,157 ****
+ goto error_occured;
+ }
+ strcpy(data.server_name, p->server_ipname);
+- str_upper(data.server_name);
+ }
+ if(data.client_name[0] == 0) {
+ if(strlen(hostname) > 16) {
+ eprintf("my hostname name too long for netbios: %s\n", hostname);
+--- 162,169 ----
+ goto error_occured;
+ }
+ strcpy(data.server_name, p->server_ipname);
+ }
++ str_upper(data.server_name);
+ if(data.client_name[0] == 0) {
+ if(strlen(hostname) > 16) {
+ eprintf("my hostname name too long for netbios: %s\n", hostname);
+***************
+*** 446,451 ****
+--- 458,464 ----
+
+ int smba_setattr(smba_file_t *f, smba_stat_t *data)
+ {
++ int error = 0;
+ if(data->atime != -1)
+ f->dirent.atime = data->atime;
+ if(data->ctime != -1)
+***************
+*** 456,462 ****
+ if(data->is_wp)
+ f->dirent.attr |= aRONLY;
+ f->attr_dirty = 1;
+! return write_attr(f);
+ }
+
+ /* ------------------------------------------------------------------------- */
+--- 469,487 ----
+ if(data->is_wp)
+ f->dirent.attr |= aRONLY;
+ f->attr_dirty = 1;
+! error = write_attr(f);
+! if (error)
+! return error;
+! if (data->size == -1)
+! return error;
+! if (data->size == f->dirent.size)
+! return error;
+! if ( (error = make_open(f, 1)) < 0)
+! return error;
+! if ( (error = smb_proc_trunc(&f->server->server, f->dirent.fileid, data->size)) < 0)
+! return error;
+! f->dirent.size = data->size;
+! return error;
+ }
+
+ /* ------------------------------------------------------------------------- */
diff --git a/net/rumba/patches/patch-ah b/net/rumba/patches/patch-ah
new file mode 100644
index 00000000000..7e18f16ff18
--- /dev/null
+++ b/net/rumba/patches/patch-ah
@@ -0,0 +1,34 @@
+*** proc.c.orig Sat Jul 5 20:26:58 1997
+--- proc.c Sat Jul 5 20:48:56 1997
+***************
+*** 920,926 ****
+
+ smb_lock_server(server);
+
+- retry:
+ p = smb_setup_header(server, SMBwrite, 5, 3);
+ WSET(buf, smb_vwv0, fid);
+ WSET(buf, smb_vwv1, 0);
+--- 920,925 ----
+***************
+*** 928,938 ****
+ WSET(buf, smb_vwv4, 0);
+ smb_encode_ascii(p, "", 0);
+
+! if ((result = smb_request_ok(server, SMBwrite, 1, 0)) < 0) {
+! if (smb_retry(server)) {
+! goto retry;
+! }
+! }
+ smb_unlock_server(server);
+ return result;
+ }
+--- 927,934 ----
+ WSET(buf, smb_vwv4, 0);
+ smb_encode_ascii(p, "", 0);
+
+! result = smb_request_ok(server, SMBwrite, 1, 0);
+!
+ smb_unlock_server(server);
+ return result;
+ }
diff --git a/net/rumba/patches/patch-ai b/net/rumba/patches/patch-ai
new file mode 100644
index 00000000000..3db0da5ee69
--- /dev/null
+++ b/net/rumba/patches/patch-ai
@@ -0,0 +1,12 @@
+*** fo_nfs.c.orig Wed Feb 5 16:50:46 1997
+--- fo_nfs.c Mon Jul 7 17:42:22 1997
+***************
+*** 142,147 ****
+--- 142,148 ----
+ smbattr->atime = attr->atime;
+ smbattr->mtime = attr->mtime;
+ smbattr->ctime = attr->ctime;
++ smbattr->size = attr->size;
+ }
+
+ /* ------------------------------------------------------------------------- */
diff --git a/net/rumba/patches/patch-aj b/net/rumba/patches/patch-aj
new file mode 100644
index 00000000000..f23a37ee07b
--- /dev/null
+++ b/net/rumba/patches/patch-aj
@@ -0,0 +1,29 @@
+--- nfs/Makefile.orig Sat Dec 14 21:58:42 1996
++++ nfs/Makefile Tue Jul 15 15:47:33 1997
+@@ -15,8 +15,8 @@
+
+ RPCGEN = rpcgen
+
+-CFLAGS = -g -I. -I..
+-LDFLAGS = -g
++CFLAGS += -I. -I..
++LDFLAGS +=
+ WARNFLAGS = -Wall
+ RPC_WARNFLAGS = -Wno-unused -Wno-switch -Wno-uninitialized
+ TRANSPORTFLAGS = -s udp -s tcp
+@@ -26,13 +26,13 @@
+
+ all: nfs.o
+
+-COMPILE = $(CC) $(ARCH) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARNFLAGS)
++COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARNFLAGS)
+
+ .c.o:
+ $(COMPILE) $<
+
+ nfs.o: $(OFILES)
+- $(LD) $(ARCH) -r -o $@ $(OFILES)
++ $(LD) -r -o $@ $(OFILES)
+
+ nfs_prot.h: nfs_prot.x
+ rm -f $@