[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-866-g70231f2

Volker Lendecke vlendec at samba.org
Sun May 3 20:16:47 GMT 2009


The branch, v3-4-test has been updated
       via  70231f2d88b96da365e56c8d077749366509a4e1 (commit)
      from  cea79d1fbf44b0d5bff5aa12962fb3d3cb61c367 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 70231f2d88b96da365e56c8d077749366509a4e1
Author: Geza Gemes <geza at kzsdabas.hu>
Date:   Sun May 3 22:13:36 2009 +0200

    Fix bug 6136: New AFS syscall conventions
    
    Haven't checked this myself, but as I've already got several reports that Samba
    won't compile against current OpenAFS anymore, I just believe Geza Gemes. This
    patch only affects AFS code, so it should not hurt anything else.
    
    Volker

-----------------------------------------------------------------------

Summary of changes:
 source3/configure.in       |    5 +++--
 source3/lib/afs.c          |    5 +++--
 source3/lib/afs_settoken.c |   18 ++++++++++++++++++
 3 files changed, 24 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index d44df14..68474b1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2866,11 +2866,12 @@ AC_ARG_WITH(fake-kaserver,
 if test x"$samba_cv_WITH_AFS" != x"no" ||
    test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then
 
+    # see if this box has the OpenSSL DES libraries
+    AC_CHECK_LIB( crypto, DES_pcbc_encrypt, LIBS="$LIBS -lcrypto" , [AC_ERROR(OpenSSL library: libcrypto ot found!)] )
+
     # see if this box has the afs-headers in /usr/include/afs
     AC_MSG_CHECKING(for /usr/include/afs)
     if test -d /usr/include/afs; then
-          CFLAGS="$CFLAGS -I/usr/include/afs"
-          CPPFLAGS="$CPPFLAGS -I/usr/include/afs"
           AC_MSG_RESULT(yes)
     else
       AC_MSG_RESULT(no)
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index 7193f0e..a76b74c 100644
--- a/source3/lib/afs.c
+++ b/source3/lib/afs.c
@@ -23,6 +23,7 @@
 
 #define NO_ASN1_TYPEDEFS 1
 
+#include <afs/param.h>
 #include <afs/stds.h>
 #include <afs/afs.h>
 #include <afs/auth.h>
@@ -230,8 +231,8 @@ bool afs_login(connection_struct *conn)
 	}
 
 	afs_username = talloc_sub_advanced(ctx,
-				SNUM(conn), conn->user,
-				conn->connectpath, conn->gid,
+				SNUM(conn), conn->server_info->unix_name,
+				conn->connectpath, conn->server_info->utok.gid,
 				conn->server_info->sanitized_username,
 				pdb_get_domain(conn->server_info->sam_account),
 				afs_username);
diff --git a/source3/lib/afs_settoken.c b/source3/lib/afs_settoken.c
index 444f09e..6421c0a 100644
--- a/source3/lib/afs_settoken.c
+++ b/source3/lib/afs_settoken.c
@@ -23,6 +23,7 @@
 
 #define NO_ASN1_TYPEDEFS 1
 
+#include <afs/param.h>
 #include <afs/stds.h>
 #include <afs/afs.h>
 #include <afs/auth.h>
@@ -37,7 +38,24 @@ int afs_syscall( int subcall,
 	  char * cmarg,
 	  int follow)
 {
+/*
 	return( syscall( SYS_afs_syscall, subcall, path, cmd, cmarg, follow));
+*/
+	int errcode;
+	struct afsprocdata afs_syscall_data;
+	afs_syscall_data.syscall = subcall;
+	afs_syscall_data.param1 = (long)path;
+	afs_syscall_data.param2 = cmd;
+	afs_syscall_data.param3 = (long)cmarg;
+	afs_syscall_data.param4 = follow;
+	int proc_afs_file = open(PROC_SYSCALL_FNAME, O_RDWR);
+	if (proc_afs_file < 0)
+		proc_afs_file = open(PROC_SYSCALL_ARLA_FNAME, O_RDWR);
+	if (proc_afs_file < 0)
+		return -1;
+	errcode = ioctl(proc_afs_file, VIOC_SYSCALL, &afs_syscall_data);
+	close(proc_afs_file);
+	return errcode;
 }
 
 struct ClearToken {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list