summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-04-14 09:44:16 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-04-14 09:44:16 +0000
commit07e6ff5fcfe337bb65a7c3a4493a92a7761cf2ed (patch)
tree0623e2c8e4b760f294c31de6f01aec1ec1a71902 /source3/include
parent06f15779303dc540ee7801fe843023970454166b (diff)
downloadsamba-07e6ff5fcfe337bb65a7c3a4493a92a7761cf2ed.tar.gz
samba-07e6ff5fcfe337bb65a7c3a4493a92a7761cf2ed.tar.bz2
samba-07e6ff5fcfe337bb65a7c3a4493a92a7761cf2ed.zip
Partly based on the work by mimir (Rafal Szczesniak
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly enumerate its trusted domains - by exaimining the keys in the secrets.tdb file. This patch has been tested with both NT4 and rpcclient/wbinfo, and adds some extra functionality to talloc and rpc_parse to allow it to deal with already unicode strings. Finally, this cleans up some const warnings that were in net_rpc.c by pushing another dash of const into the rpc client code. Andrew Bartlett (This used to be commit 0bdd94cb992b40942aaf2e5e0efd2868b4686296)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/rpc_lsa.h4
-rw-r--r--source3/include/secrets.h22
3 files changed, 21 insertions, 6 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 5da1c1d997..1dfebcea78 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -696,6 +696,7 @@ extern int errno;
#include "dlinklist.h"
#include "../tdb/tdb.h"
#include "../tdb/spinlock.h"
+#include "../tdb/tdbutil.h"
#include "talloc.h"
#include "ads.h"
#include "interfaces.h"
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index ccdce6f263..ceb0e17d5c 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -278,8 +278,8 @@ typedef struct lsa_r_query_info
typedef struct lsa_enum_trust_dom_info
{
POLICY_HND pol; /* policy handle */
- uint32 enum_context; /* enumeration context handle */
- uint32 preferred_len; /* preferred maximum length */
+ uint32 enum_context; /* enumeration context handle */
+ uint32 preferred_len; /* preferred maximum length */
} LSA_Q_ENUM_TRUST_DOM;
diff --git a/source3/include/secrets.h b/source3/include/secrets.h
index 69ab4f6c8d..3d7e2aa97e 100644
--- a/source3/include/secrets.h
+++ b/source3/include/secrets.h
@@ -48,12 +48,26 @@ struct machine_acct_pass {
time_t mod_time;
};
-/* structure for storing trusted domain password */
+/*
+ * storage structure for trusted domain
+ */
struct trusted_dom_pass {
- int pass_len;
- fstring pass;
+ size_t uni_name_len;
+ smb_ucs2_t uni_name[32]; /* unicode domain name */
+ size_t pass_len;
+ fstring pass; /* trust relationship's password */
time_t mod_time;
- DOM_SID domain_sid; /* remote domain's sid */
+ DOM_SID domain_sid; /* remote domain's sid */
};
+/*
+ * trusted domain entry/entries returned by secrets_get_trusted_domains
+ * (used in _lsa_enum_trust_dom call)
+ */
+typedef struct trustdom {
+ smb_ucs2_t *name;
+ DOM_SID sid;
+} TRUSTDOM;
+
+
#endif /* _SECRETS_H */