diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-30 00:41:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:58 -0500 |
commit | 7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22 (patch) | |
tree | 31b40e747ae679f4d6eeef2f8b3999070c747ea6 /source4/scripting/ejs/smbcalls_samba3.c | |
parent | 37194224416d7509a457ee4aa18991b8bab0da7d (diff) | |
download | samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.tar.gz samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.tar.bz2 samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.zip |
r9770: Couple other bugfixes
Update TODO-list
(This used to be commit d9541535e3f9e1c058410eeb0a54d60181572f2b)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_samba3.c')
-rw-r--r-- | source4/scripting/ejs/smbcalls_samba3.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/scripting/ejs/smbcalls_samba3.c b/source4/scripting/ejs/smbcalls_samba3.c index eb37168bc8..936426c2da 100644 --- a/source4/scripting/ejs/smbcalls_samba3.c +++ b/source4/scripting/ejs/smbcalls_samba3.c @@ -165,6 +165,7 @@ static struct MprVar mprDomainSecrets(struct samba3_domainsecrets *ds) { struct MprVar v, e = mprObject("domainsecrets"); char *tmp; + DATA_BLOB blob; mprSetVar(&e, "name", mprString(ds->name)); @@ -183,7 +184,9 @@ static struct MprVar mprDomainSecrets(struct samba3_domainsecrets *ds) v = mprObject("hash_pw"); - mprSetVar(&v, "hash", mprData(ds->hash_pw.hash, 16)); + blob.data = ds->hash_pw.hash; + blob.length = 16; + mprSetVar(&v, "hash", mprDataBlob(blob)); mprSetVar(&v, "mod_time", mprCreateIntegerVar(ds->hash_pw.mod_time)); @@ -259,9 +262,12 @@ static struct MprVar mprSecrets(struct samba3_secrets *sec) for (j = 0; j < 8; j++) { struct MprVar k = mprObject("entry"); + DATA_BLOB blob; mprSetVar(&k, "kvno", mprCreateIntegerVar(sec->afs_keyfiles[i].entry[j].kvno)); - mprSetVar(&k, "key", mprData((uint8_t*)sec->afs_keyfiles[i].entry[j].key, 8)); + blob.data = (uint8_t*)sec->afs_keyfiles[i].entry[j].key; + blob.length = 8; + mprSetVar(&k, "key", mprDataBlob(blob)); mprAddArray(&ks, j, k); } @@ -316,6 +322,7 @@ static struct MprVar mprSamAccounts(struct samba3 *samba3) for (i = 0; i < samba3->samaccount_count; i++) { struct samba3_samaccount *a = &samba3->samaccounts[i]; + DATA_BLOB blob; m = mprObject("samba3_samaccount"); @@ -343,8 +350,11 @@ static struct MprVar mprSamAccounts(struct samba3 *samba3) mprSetVar(&m, "profile_path", mprString(a->profile_path)); mprSetVar(&m, "acct_desc", mprString(a->acct_desc)); mprSetVar(&m, "workstations", mprString(a->workstations)); - mprSetVar(&m, "lm_pw", mprData(a->lm_pw.hash, 16)); - mprSetVar(&m, "nt_pw", mprData(a->nt_pw.hash, 16)); + blob.length = 16; + blob.data = a->lm_pw.hash; + mprSetVar(&m, "lm_pw", mprDataBlob(blob)); + blob.data = a->nt_pw.hash; + mprSetVar(&m, "nt_pw", mprDataBlob(blob)); mprAddArray(&mpv, i, m); } |