samba on lynxos 3.0

Olaf Flebbe o.flebbe at science-computing.de
Wed Nov 27 13:20:00 GMT 2002


Hi,

I had some (expected) problems compiling samba 2.2.7 on LynxOS 3.0.1

Almost all is due to the Header vfs.h

* Lynos has a weird <sys/vfs.h>: It includes itself <vfs.h>. But unfortunatly it 
gets the samba/include/vfs.h instead of the <vfs.h> header file. I worked around 
this issue with CC="gcc -I/usr/include" to get the /usr/include files first.

* Somehow it generates warnings when #including files like <vfs.h>. I worked 
around this with defining  -D__NO_INCLUDE_WARN__  So the configure statement read:
export CC="gcc -D__NO_INCLUDE_WARN__ -I/usr/include"; configure

* The networking functions are located in -lnetinet aka -lbsd. This library is 
not detected at all.
IMHO there should be a AC_CHECK_LIB(netinet, gethostbyaddr) in configure.in. I 
can not confirm this because configure.in seems to rely on autoconf 2.13 (?)

* Both vfs.h (The system and samba) define a function vfs_mkdir with a different 
prototype. I changed vfs_mkdir in samba to samba_vfs_mkdir.


*** I would recommend to rename vfs.h ***

* There is a spurious uint in the source....

A trivial patch for vfs_mkdir and the uint issue is attached.


Unfortunatly there is no crypt() available on Lynxos. So you have to work around 
this issue somehow.

Cheers,
   Olaf
-- 
   Dr. Olaf Flebbe                            Phone +49 (0)7071-9457-254
   Software Solutions                         FAX   +49 (0)7071-9457-211
   science + computing ag
   Hagellocher Weg 73-75
   D-72070 Tuebingen                Email: o.flebbe at science-computing.de

       The amount of work to be done increases in proportion to the
                   amount of work already completed.

-------------- next part --------------
diff -ur samba-2.2.7/source/include/proto.h samba-2.2.7.lynx/source/include/proto.h
--- samba-2.2.7/source/include/proto.h	Wed Nov 20 02:31:32 2002
+++ samba-2.2.7.lynx/source/include/proto.h	Tue Nov 26 10:33:59 2002
@@ -4866,7 +4866,7 @@
 
 BOOL smbd_vfs_init(connection_struct *conn);
 BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st);
-int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode);
+int samba_vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode);
 char *vfs_getwd(connection_struct *conn, char *unix_path);
 BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
 BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
diff -ur samba-2.2.7/source/libsmb/cli_samr.c samba-2.2.7.lynx/source/libsmb/cli_samr.c
--- samba-2.2.7/source/libsmb/cli_samr.c	Thu Jun  6 21:16:18 2002
+++ samba-2.2.7.lynx/source/libsmb/cli_samr.c	Tue Nov 26 13:00:13 2002
@@ -416,7 +416,7 @@
 	SAMR_Q_QUERY_USERALIASES q;
 	SAMR_R_QUERY_USERALIASES r;
 	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-	uint ptr=1;
+	unsigned int ptr=1;
 	
 	ZERO_STRUCT(q);
 	ZERO_STRUCT(r);
diff -ur samba-2.2.7/source/smbd/open.c samba-2.2.7.lynx/source/smbd/open.c
--- samba-2.2.7/source/smbd/open.c	Tue Nov 19 04:49:18 2002
+++ samba-2.2.7.lynx/source/smbd/open.c	Tue Nov 26 10:33:30 2002
@@ -1199,7 +1199,7 @@
 				return NULL;
 			}
 
-			if(vfs_mkdir(conn,fname, unix_mode(conn,aDIR, fname)) < 0) {
+			if(samba_vfs_mkdir(conn,fname, unix_mode(conn,aDIR, fname)) < 0) {
 				DEBUG(2,("open_directory: unable to create %s. Error was %s\n",
 					 fname, strerror(errno) ));
 				file_free(fsp);
diff -ur samba-2.2.7/source/smbd/reply.c samba-2.2.7.lynx/source/smbd/reply.c
--- samba-2.2.7/source/smbd/reply.c	Wed Nov 20 02:31:33 2002
+++ samba-2.2.7.lynx/source/smbd/reply.c	Tue Nov 26 10:33:21 2002
@@ -3575,7 +3575,7 @@
 	unix_convert(directory,conn,0,&bad_path,&sbuf);
   
 	if (check_name(directory, conn))
-		ret = vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory));
+		ret = samba_vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory));
   
 	if (ret == -1) {
 		NTSTATUS nterr = set_bad_path_error(errno, bad_path);
diff -ur samba-2.2.7/source/smbd/trans2.c samba-2.2.7.lynx/source/smbd/trans2.c
--- samba-2.2.7/source/smbd/trans2.c	Tue Nov 19 19:44:21 2002
+++ samba-2.2.7.lynx/source/smbd/trans2.c	Tue Nov 26 10:33:06 2002
@@ -2959,7 +2959,7 @@
 
 	unix_convert(directory,conn,0,&bad_path,&sbuf);
 	if (check_name(directory,conn))
-		ret = vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory));
+		ret = samba_vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory));
   
 	if(ret < 0) {
 		DEBUG(5,("call_trans2mkdir error (%s)\n", strerror(errno)));
diff -ur samba-2.2.7/source/smbd/vfs.c samba-2.2.7.lynx/source/smbd/vfs.c
--- samba-2.2.7/source/smbd/vfs.c	Tue Nov 19 19:44:21 2002
+++ samba-2.2.7.lynx/source/smbd/vfs.c	Tue Nov 26 10:32:49 2002
@@ -223,7 +223,7 @@
  vfs mkdir wrapper that calls dos_to_unix.
 ********************************************************************/
 
-int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode)
+int samba_vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode)
 {
 	int ret;
 	pstring name;


More information about the samba-technical mailing list