1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-30 08:23:49 +03:00
Commit Graph

239 Commits

Author SHA1 Message Date
Andrew Tridgell
4afb16d7b2 r9499: added error checking to the userAuth() call. SWAT is still failing, but at least it now
tells us why
2007-10-10 13:34:23 -05:00
Andrew Tridgell
76ffc20079 r9496: added a regToVar() function that converts a registry blob variable to a ejs variable. 2007-10-10 13:34:22 -05:00
Andrew Tridgell
516ba6d20b r9492: it is more usual to return 'undefined' instead of 'false' on a call failing (unless the
call is returning a boolean anyway).

Unfortunately the new GetOptions syntax loses the ability for the caller to know why the
command line arguments were bad. Maybe we would be better always returning an object and
having an is_error element?
2007-10-10 13:34:21 -05:00
Rafal Szczesniak
1990793b23 r9477: Convert popt options to an ejs object. Doesn't seem to break anything
except of popt help (-h) option (unexpected ?).

rafal
2007-10-10 13:34:20 -05:00
Andrew Tridgell
3d6739eaa6 r9464: fixed a problem with child pointers copied into non-allocated mpr variables. We
now use the same free technique as is used for mpr strings, rather than relying on
being a child of the variable
2007-10-10 13:34:18 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Andrew Tridgell
cc5a3e9cc3 r9344: started adding calls for manipulation of data blobs in ejs
added:

  blobToArray()
  blobFromArray()
  blobCompare()
2007-10-10 13:33:26 -05:00
Andrew Tridgell
a7a1752ca4 r9340: print the [in] contents when debugging even if the marshalling
failed. This makes it easier to track down marshalling bugs.
2007-10-10 13:33:25 -05:00
Andrew Tridgell
a8bca2e8e2 r9339: treat arrays of uint8 values as a special DATA_BLOB type in the ejs
interfaces to RPC. This makes large blobs of data much saner. Tim, you
will probably want to do the same for the smb_interfaces.h generated
code.

Next we will need ways of extracting different data types from these
blobs, for example asking for the blob to be interpreted as a utf16
string, or as a little-endian integer. That will allow for registry
scripting to be quite sane.
2007-10-10 13:33:25 -05:00
Andrew Tridgell
3ec376141e r9226: make sure we catch rpc faults in the ejs rpc wrappers 2007-10-10 13:31:34 -05:00
Andrew Tridgell
15737abd74 r9210: fixed support for a credentials element in a rpc object in ejs to not
give lots of warnings of missing properties
2007-10-10 13:31:31 -05:00
Andrew Tridgell
aae05ebc9c r9171: - support putting a credentials object in a rpc pipe object to allow authentication
with other than the command line credentials in a rpc pipe
2007-10-10 13:31:27 -05:00
Andrew Tridgell
2f6311c9a3 r9146: - enable winreg pipe from ejs
- map the result code from rpc calls into the ejs objects

- treat winreg_String like lsa_String, hiding the length elements
2007-10-10 13:31:23 -05:00
Andrew Tridgell
f91f5eeac9 r9132: 'pointer' is better for typedef than 'C pointer' 2007-10-10 13:31:20 -05:00
Tim Potter
0e022f8d45 r9123: Add ejs_pull_DATA_BLOB() and ejs_pull_BOOL() although leave DATA_BLOB
unimplemented for the moment.
2007-10-10 13:31:18 -05:00
Andrew Tridgell
8db549b150 r9119: added a lp.categories() call in the loadparm js object, to allow
retrieval of the smb.conf parameter categories. This will make writing
a smb.conf editor easier.
2007-10-10 13:31:18 -05:00
Tim Potter
c61b29bdf0 r9096: Spelling. 2007-10-10 13:31:16 -05:00
Andrew Tridgell
f91f705a14 r9082: added the ECMA functions encodeURIComponent() and
decodeURIComponent(), which I am using as part of my object
linearisation code
2007-10-10 13:31:15 -05:00
Rafal Szczesniak
eb7a5d09c7 r9071: Set real and workstation fields in ejs credentials object.
rafal
2007-10-10 13:31:14 -05:00
Rafal Szczesniak
e819c035f7 r9070: More fields in ejs credentials object.
rafal
2007-10-10 13:31:14 -05:00
Andrew Tridgell
36a9277e87 r9059: add a basic credentials object for mimir 2007-10-10 13:31:13 -05:00
Jelmer Vernooij
ce0935112b r8966: Simplify the makefile generation system a bit.
Autogenerate list of binaries (rather then having them hardcoded in build/smb_build/makefile.pm)
Add INSTALLDIR keyword to .mk files
2007-10-10 13:31:00 -05:00
Andrew Tridgell
ce9a262d37 r8887: fixed the irpc error that caused ia64 to fail the LOCAL-IRPC test 2007-10-10 13:30:15 -05:00
Andrew Tridgell
f7b49ecd08 r8821: continue the trend to move to a more OO style of interface for our js
calls. This changes the generated RPC and IRPC calls to use the 'this'
object pointer instead of requiring the passing of the object on each
call. So typical usage is now:

var echo = echo_init();
var io = irpcObj();

status = echo.connect("ncacn_np:server");
assert(status.is_ok);

io.input.in_data = 7;
status = echo.AddOne(io);
assert(status.is_ok);
2007-10-10 13:30:08 -05:00
Andrew Tridgell
8086c37df6 r8742: fixed handling of zero length names in mprObject() 2007-10-10 13:30:00 -05:00
Andrew Bartlett
ecbd2235a3 r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/

This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.

Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists.  This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.

Andrew Bartlett
2007-10-10 13:29:55 -05:00
Andrew Tridgell
acf8c8fd49 r8678: setup for gdb backtrace in 'make test' 2007-10-10 13:29:53 -05:00
Andrew Tridgell
a569fc8924 r8661: added strstr() ejs function in string lib 2007-10-10 13:29:51 -05:00
Andrew Tridgell
d2c29a5a51 r8659: return ldif formatted attributes in the ejs ldb search call, so sids show up as strings
not binary blobs
2007-10-10 13:29:50 -05:00
Andrew Tridgell
c2691ef712 r8643: - make lp_configfile() work again
- get rid of redundeny dyn_CONFIGFILE argument to lp_load()

- fixed provisioning to work with completely pristine install,
  creating an initial smb.conf is none is present

- added lp.set() and lp.reload() to loadparm ejs object interface
2007-10-10 13:29:48 -05:00
Andrew Tridgell
ed4fb68ef7 r8640: continue the trend by moving the ejs random calls into an object 2007-10-10 13:29:48 -05:00
Andrew Tridgell
2dc493eea6 r8639: moved loadparm calls into an ejs object 2007-10-10 13:29:48 -05:00
Andrew Tridgell
a978484738 r8638: continue the trend of maknig our C functions true ejs objects by making the string functions
into an object. To keep existing code working I have added:

  string_init(global);

into base.js. That brings the functions into the global scope for our
existing scripts
2007-10-10 13:29:48 -05:00
Andrew Tridgell
5dbdf4fb33 r8637: added sys.stat() and sys.lstat() calls 2007-10-10 13:29:48 -05:00
Andrew Tridgell
6a1ed328e2 r8635: make object inheritance with the builtin objects easy by allowing
callers to optionally supply an existing object to add the properties
to. So you can do:

 var rpc = samr_init();
 lsa_init(rpc);

and you end up with 'rpc' having both the samr and lsa functions and
constants available.
2007-10-10 13:29:47 -05:00
Andrew Tridgell
8e788ae309 r8633: check for valid input to ejs_userAuth() 2007-10-10 13:29:46 -05:00
Andrew Tridgell
9e07c08a71 r8629: - moved the getDomainList() call out of smbcalls_auth.c and into libjs/auth.js
- tried to make the ejs_userAuth() call work for the sam, not just for
  unix auth. I didn't get this working. Andrew, when you get a chance
  can you see what I'm doing wrong? I suspect its because we aren't
  supplying a challenge, but a challenge doesn't really make sense in a
  'is this username/password' correct call.
2007-10-10 13:29:46 -05:00
Andrew Tridgell
4c1d6a97c0 r8602: allow options in ldb connect calls 2007-10-10 13:29:44 -05:00
Andrew Tridgell
632f7bbe3e r8582: added sys.httptime() call, to display a NTTIME as a http time string 2007-10-10 13:29:41 -05:00
Andrew Tridgell
2ae6a33846 r8581: fixed handling of 64 bit integers in rpc calls from ejs 2007-10-10 13:29:41 -05:00
Andrew Tridgell
9af48b8fc2 r8569: delete is a js reserved word, so use del instead 2007-10-10 13:29:39 -05:00
Andrew Tridgell
a3f3292e66 r8561: as with the other ejs subsystems, make nss into a object 2007-10-10 13:29:38 -05:00
Andrew Tridgell
21ca972d06 r8557: expose ldb_errstring() in ldb ejs code 2007-10-10 13:29:37 -05:00
Andrew Tridgell
a58ea6b385 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
2007-10-10 13:29:34 -05:00
Simo Sorce
e709e37928 r8516: let us use all parameters of ldbsearch in ldb.search 2007-10-10 13:29:33 -05:00
Simo Sorce
5a6c2170ff r8499: clearer function name 2007-10-10 13:23:10 -05:00
Andrew Tridgell
ccf20b2b13 r8489: neaten up the object handling 2007-10-10 13:23:09 -05:00
Andrew Tridgell
cf35818648 r8488: after discussions with simo, moved to a full OO interface, so you don't need to keep
a 'db' variable around. The ldb object knows what it is connected to.

Added a simple ldb testsuite in testprogs/ldb.js
2007-10-10 13:23:08 -05:00
Andrew Tridgell
98c9c4ecb8 r8486: switched to a separate connection operation in ldb interface
(a suggestion from simo)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
9991e924e9 r8484: switched the sys_*() calls to the OO interface
tim, do you want to do the cli_*() calls now?
2007-10-10 13:23:08 -05:00