summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGeza Gemes <geza@kzsdabas.hu>2009-05-03 22:13:36 +0200
committerVolker Lendecke <vl@samba.org>2009-05-03 22:16:01 +0200
commit5c2404fb86bba0c0f137fdece38d390f0b291515 (patch)
treeccc9372209083df21ba17f9721947218eb2fa823 /source3/lib
parent2467ae1b6ad3600eeed5223df672111d9ac3f3db (diff)
downloadsamba-5c2404fb86bba0c0f137fdece38d390f0b291515.tar.gz
samba-5c2404fb86bba0c0f137fdece38d390f0b291515.tar.bz2
samba-5c2404fb86bba0c0f137fdece38d390f0b291515.zip
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
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/afs.c5
-rw-r--r--source3/lib/afs_settoken.c18
2 files changed, 21 insertions, 2 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index 7193f0e46d..a76b74c616 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 444f09efca..6421c0a55b 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 {