summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/afs.c15
-rw-r--r--source3/lib/afs_settoken.c2
-rw-r--r--source3/utils/net_afs.c2
3 files changed, 15 insertions, 4 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index 7a49c5772e..379cf676d5 100644
--- a/source3/lib/afs.c
+++ b/source3/lib/afs.c
@@ -23,6 +23,11 @@
#define NO_ASN1_TYPEDEFS 1
+#include "secrets.h"
+#include "passdb.h"
+#include "auth.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
+
#include <afs/param.h>
#include <afs/stds.h>
#include <afs/afs.h>
@@ -231,16 +236,18 @@ bool afs_login(connection_struct *conn)
}
afs_username = talloc_sub_advanced(ctx,
- SNUM(conn), conn->session_info->unix_info->unix_name,
- conn->connectpath, conn->session_info->unix_token->gid,
+ lp_servicename(SNUM(conn)),
+ conn->session_info->unix_info->unix_name,
+ conn->connectpath,
+ conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- pdb_get_domain(conn->session_info->sam_account),
+ conn->session_info->info->domain_name,
afs_username);
if (!afs_username) {
return false;
}
- user_sid = &conn->session_info->security_token->user_sids[0];
+ user_sid = &conn->session_info->security_token->sids[0];
afs_username = talloc_string_sub(talloc_tos(),
afs_username,
"%s",
diff --git a/source3/lib/afs_settoken.c b/source3/lib/afs_settoken.c
index 80eed13e52..149fc66b0e 100644
--- a/source3/lib/afs_settoken.c
+++ b/source3/lib/afs_settoken.c
@@ -23,6 +23,8 @@
#define NO_ASN1_TYPEDEFS 1
+#include "system/filesys.h"
+
#include <afs/param.h>
#include <afs/stds.h>
#include <afs/afs.h>
diff --git a/source3/utils/net_afs.c b/source3/utils/net_afs.c
index f6b2b2db8a..e8d28f48fd 100644
--- a/source3/utils/net_afs.c
+++ b/source3/utils/net_afs.c
@@ -19,6 +19,8 @@
#include "includes.h"
#include "utils/net.h"
+#include "secrets.h"
+#include "system/filesys.h"
int net_afs_usage(struct net_context *c, int argc, const char **argv)
{