summaryrefslogtreecommitdiffstats
path: root/source/passdb
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-02-10 08:31:34 +0000
committerLuke Leighton <lkcl@samba.org>2000-02-10 08:31:34 +0000
commit2dcd4943ae34e22657f3c196a9560ead08f6ae0f (patch)
treecd3993130de3b7b88e458a26a20f409657accdf5 /source/passdb
parente79b9afae2a797884b8d5866a6d5c4e716213697 (diff)
downloadsamba-2dcd4943ae34e22657f3c196a9560ead08f6ae0f.tar.gz
samba-2dcd4943ae34e22657f3c196a9560ead08f6ae0f.tar.xz
samba-2dcd4943ae34e22657f3c196a9560ead08f6ae0f.zip
added implementation of _lsa_open_secret.
Diffstat (limited to 'source/passdb')
-rw-r--r--source/passdb/smbpassfile.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/passdb/smbpassfile.c b/source/passdb/smbpassfile.c
index b4f8e6f2eb8..806932fe351 100644
--- a/source/passdb/smbpassfile.c
+++ b/source/passdb/smbpassfile.c
@@ -236,6 +236,35 @@ account is now invalid. Please recreate. Error was %s.\n", strerror(errno) ));
return True;
}
+BOOL trust_get_passwd_time( uchar trust_passwd[16],
+ const char *domain, const char *myname,
+ NTTIME *modtime)
+{
+ time_t lct;
+
+ /*
+ * Get the trust account password.
+ */
+ if(!trust_password_lock( domain, myname, False)) {
+ DEBUG(0,("trust_get_passwd: unable to open the trust account password file for \
+trust %s in domain %s.\n", myname, domain ));
+ return False;
+ }
+
+ if(get_trust_account_password( trust_passwd, &lct) == False) {
+ DEBUG(0,("trust_get_passwd: unable to read the trust account password for \
+trust %s in domain %s.\n", myname, domain ));
+ trust_password_unlock();
+ return False;
+ }
+
+ trust_password_unlock();
+
+ unix_to_nt_time(modtime, lct);
+
+ return True;
+}
+
BOOL trust_get_passwd( uchar trust_passwd[16],
const char *domain, const char *myname)
{