1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

40 Commits

Author SHA1 Message Date
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Simo Sorce
7ca399c075 r21351: Change ldb ejs bindings return codes.
We were returning just true/false and discarding error number and string.

This checking probably breaks swat, will fix it in next round as swat
is what made me look into this as I had no way to get back error messages
to show to the users.

Simo.
(This used to be commit 35886b4ae6)
2007-10-10 14:48:18 -05:00
Stefan Metzmacher
c69717755a r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct.

the default attribute handler is now registered dynamicly as "*"
attribute, instead of having its own code path.

ldb_schema_attribute's can be added to the ldb_schema given a
ldb_schema_syntax struct or the syntax name

we may also need to introduce a ldb_schema_matching_rule,
and add a pointer to a default ldb_schema_matching_rule
in the ldb_schema_syntax.

metze
(This used to be commit b97b8f5dcb)
2007-10-10 14:29:19 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5)
2007-10-10 14:28:22 -05:00
Simo Sorce
a46beefeb7 r17648: update minschema.js
this version returns also oMSyntax and oMObjectClass and also
use the right value for the objects CNs

add a nasty hack to ejs' mprLdbMessage() to handle binary blobs situations
(This used to be commit 8dd1c1c05b)
2007-10-10 14:16:19 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Stefan Metzmacher
760f5b4b39 r13710: fix compiler warnings
metze
(This used to be commit 6ee7de9bbf)
2007-10-10 13:52:07 -05:00
Andrew Tridgell
783851099b r11458: fixed our ejs smbscript interfaces to use arrays where appropriate. In
js arrays are a special type of object where the length property is
automatic, and cannot be modified manually. Our code was manually
setting length, which made it abort when someone passed in a real ejs
array. To fix this we need to create real arrays instead of objects,
and remove the code that manually sets the length
(This used to be commit ebdd1393fd)
2007-10-10 13:45:39 -05:00
Jelmer Vernooij
37059d70d9 r9700: Change DATA_BLOB in ejs back to struct datablob
Support writing idmap mappings to winbind.ldif
(This used to be commit 3709def353)
2007-10-10 13:34:49 -05:00
Jelmer Vernooij
95ed275dbb r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
(This used to be commit b7b079167d)
2007-10-10 13:34:42 -05:00
Andrew Tridgell
81556a9078 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
(This used to be commit 3d6739eaa6)
2007-10-10 13:34:18 -05:00
Simo Sorce
3e4c4cff21 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
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Andrew Tridgell
ba6d3075bc 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.
(This used to be commit a8bca2e8e2)
2007-10-10 13:33:25 -05:00
Andrew Tridgell
2b31c6d9d0 r9210: fixed support for a credentials element in a rpc object in ejs to not
give lots of warnings of missing properties
(This used to be commit 15737abd74)
2007-10-10 13:31:31 -05:00
Andrew Tridgell
2ed26253c1 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
(This used to be commit aae05ebc9c)
2007-10-10 13:31:27 -05:00
Tim Potter
1b42035bd9 r9096: Spelling.
(This used to be commit c61b29bdf0)
2007-10-10 13:31:16 -05:00
Andrew Tridgell
8fbcde9450 r8742: fixed handling of zero length names in mprObject()
(This used to be commit 8086c37df6)
2007-10-10 13:30:00 -05:00
Andrew Tridgell
7a8ac75887 r8659: return ldif formatted attributes in the ejs ldb search call, so sids show up as strings
not binary blobs
(This used to be commit d2c29a5a51)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
240ca36cf2 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.
(This used to be commit 6a1ed328e2)
2007-10-10 13:29:47 -05:00
Andrew Tridgell
84e3efd8ea r8489: neaten up the object handling
(This used to be commit ccf20b2b13)
2007-10-10 13:23:09 -05:00
Andrew Tridgell
94d99612b9 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
(This used to be commit cf35818648)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
63535f566e r8481: switched ldb ejs called over to an OO interface, so you do:
var ldb = ldb_init();

res = ldb.search(dbfile, "(objectClass=user)");

you can also do:

ldbSearch = ldb.search;
res = ldbSearch(dbfile, "(objectClass=user)");

if you want the old interface (ie. you can use this to import
functions into the global or local namespace).
(This used to be commit 3093057d97)
2007-10-10 13:23:07 -05:00
Andrew Tridgell
adbb1612c1 r8399: move the ejs and esp code closer to the directory layout used by the
upstream sources. This makes it much easier to keep it up to date.

I will separate out the mpr code into lib/appweb/mpr next
(This used to be commit 52db7a052b)
2007-10-10 13:22:39 -05:00
Andrew Tridgell
9f86e20286 r8340: - added sys_gmtime()
- added sys_unlink()

- added sys_file_load() and sys_file_save()

- use mprString() instead of mprCreateStringVar() to cope with NULL strings

- removed smbcalls_irpc.c as its not needed any more

- allow ldbAdd() and ldbModify() to take multiple ldif records

- added a sprintf() function to ejs. Quite complex, but very useful!
(This used to be commit 625628a3f6)
2007-10-10 13:20:08 -05:00
Andrew Tridgell
b1e93b296e r8337: - use 64 bit access functions in ejs calls
- added access to smbd random functions

- fixed ordering in join()

- added sys_interfaces(), sys_hostname(), sys_nttime() and sys_ldaptime()
(This used to be commit 28c1a1f3c0)
2007-10-10 13:20:07 -05:00
Andrew Tridgell
ba1ee57df4 r8333: merged with latest upstream ejs sources
(This used to be commit b0f9ddafe9)
2007-10-10 13:20:07 -05:00
Andrew Tridgell
887461327a r8320: make sure all our returned objects are full objects, which means they
have the toString() and valueOf() default attributes

this allows all our returned objects to be used in logical expressions
(This used to be commit 570f071b15)
2007-10-10 13:20:06 -05:00
Andrew Tridgell
683432660e r8318: added a bunch more ejs calls.
getgr*()
  getpw*()
  strlower()
  strupper()
  IfaceList()
(This used to be commit 1517ad490d)
2007-10-10 13:20:06 -05:00
Andrew Tridgell
f583a85d4d r8316: give full access to the popt command line parsing in ejs scripts, including
access to the samba common options. For example:

ok = GetOptions(ARGV, options,
		"POPT_AUTOHELP",
		"POPT_COMMON_SAMBA",
		"myopt=s",
		"intopt=i",
		"noopt");

this allows scripts to support their own extended options properly
(This used to be commit 775fb56ac2)
2007-10-10 13:20:05 -05:00
Andrew Tridgell
056096c30b r8284: - fixed some uninitialised variables in the irpc code
- added code to send multiple irpc calls in parallel, to all servers
  that have registered the given name, with output going in
  io.results[i]. This allows you to make rpc calls to multiple servers
  at once, which is needed for clients like smbstatus
(This used to be commit 061e20e509)
2007-10-10 13:19:31 -05:00
Andrew Tridgell
f3c6f290f0 r8280: - added irpc_connect() for connecting to a irpc server by name
- make the dcerpc pipe in rpc_connect() a talloc child of the ejs
  connection variable. That means when the connection variable goes out
  of scope, the connection is automatically closed. That makes for a
  more natural interface for closing connections in a scripting language
  (tpot, you may wish to use mprSetPtrChild() in your smb glue code too)
(This used to be commit 1c170138a8)
2007-10-10 13:19:30 -05:00
Andrew Tridgell
60ec75cbc7 r8276: fixed the remaining memory leaks in smbscript. We can now loop doing
lots of rpc calls without memory usage increasing.
(This used to be commit 9c885a7edb)
2007-10-10 13:19:30 -05:00
Andrew Tridgell
7efeb8f451 r8256: - allow rpc calls from non-command line ejs contexts by creating a set
of null credentials to use if cmdline_credentials is not setup

- hide the length and size elements of a lsa_String from js scripts,
  so you can use a lsa_String just as an ordinary string without
  knowing its a structure. We won't do this with all structures, just
  a few core ones that are used often enough to warrant it.

- make sure returned ldb arrays have a length property
(This used to be commit 12d2092dd8)
2007-10-10 13:19:26 -05:00
Andrew Tridgell
9331714787 r8073: a successful rpc call from ejs!
the ejs_echo.c code is the stuff that needs to be auto-generated by
pidl. It only does echo_AddOne so far.

We also need a table for registering these calls. The code is
hard-wired for echo_AddOne for now.
(This used to be commit b1ea58ddc4)
2007-10-10 13:19:05 -05:00
Andrew Tridgell
643e5d8239 r8069: the beginnings of code to allow rpc calls to be made from ejs
tpot, note that this shows how you can modify passed in MprVar
variables in C call
(This used to be commit a782541db3)
2007-10-10 13:19:04 -05:00
Tim Potter
384ad5c71b r7254: Add a mprWERROR() function with the same attributes as mprNTSTATUS.
(This used to be commit 2fa6f7bb2b)
2007-10-10 13:17:32 -05:00
Tim Potter
e8cbe7f3a4 r7225: Create a MprVar object from a NTSTATUS, e.g:
res: {
  is_err: true,
  is_ok: false,
  errstr: "NT_STATUS_IO_TIMEOUT",
  v: -1073741643
}
(This used to be commit d81d5f8317)
2007-10-10 13:17:28 -05:00
Tim Potter
18fa5ea9ef r7081: Add mprToInt() function.
(This used to be commit 790a46f53b)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
8754c793bf r7072: moved the esp hooks calls to the ejs level, so we can call them from
both esp scripts and ejs scripts. This allows the smbscript program to
call all the existing extension calls like lpGet() and ldbSearch()

Also fixed smbscript to load smb.conf, and setup logging for DEBUG()

I left the unixAuth() routine in web_server/calls.c at the moment, as
that is really only useful for esp scripts. I imagine that as we
extend esp/ejs, we will put some functions in scripting/ejs/ for use
in both ejs and esp, and some functions in web_server/ where they will
only be accessed by esp web scripts
(This used to be commit e59ae64f60)
2007-10-10 13:17:12 -05:00