1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

210 Commits

Author SHA1 Message Date
Andrew Tridgell
76ecf81428 r8273: fixed some memory leaks in smbscript. This required converting
file_load() to use talloc, which impacted quite a few bits of code,
including our smb.conf processing.

took the opportunity to remove the gloabls in params.c while doing this
(This used to be commit b220756cb4)
2007-10-10 13:19:29 -05:00
Andrew Tridgell
b4e53e6705 r8262: - simplify the dependency handling for ejs modules
- added config.mk entries for some more pipes

- simplify the handling of ejs variables in the pidl code
(This used to be commit 595304708d)
2007-10-10 13:19:27 -05:00
Andrew Tridgell
cd88764ba1 r8260: added an init based registration system for the generated ejs rpc code, so
adding a new pipe only involves changes to librpc/config.mk
(This used to be commit 0e54fa4466)
2007-10-10 13:19:27 -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
fe1cf1eeb7 r8254: fixed a valgrind error in the unix auth code
(This used to be commit ad1a4802d0)
2007-10-10 13:19:26 -05:00
Andrew Tridgell
987e67df52 r8238: - fixed handling of NULL pointers from ejs
- added automatic creation of all constants in IDL as ejs variables
(This used to be commit 9398b02e4b)
2007-10-10 13:19:23 -05:00
Andrew Tridgell
e897a57067 r8236: fixed support for arrays of structures
(This used to be commit cbe5289ac9)
2007-10-10 13:19:23 -05:00
Andrew Tridgell
f55b2b9610 r8233: - added support for more base types in pidl ejs
- added auto generation of a header with prototypes for public ejs functions

- make public functions non-static

- fixed allocation of fixed sized arrays

- added 'noejs' flag indicating that a typedef will be handled manually by ejs

- added manual functions for sid and GUID, so they show up as nice
  strings in ejs scripts

This allows ejs to bring in samr, security, lsa and misc IDL functions
(This used to be commit a8cb2dbdcc)
2007-10-10 13:19:23 -05:00
Andrew Tridgell
c851532bec r8230: prevent authentication dying on a NULL domain
(This used to be commit e1cfc6d032)
2007-10-10 13:19:22 -05:00
Andrew Tridgell
c11204339a r8220: added auto-generation of ENUM constants in ejs wrapper. So we can now use the enum name
instead of a integer in ejs scripts making rpc calls
(This used to be commit a61cdee384)
2007-10-10 13:19:21 -05:00
Andrew Tridgell
5fa5eb1da0 r8216: - handle union pull in ejs pidl generation
- added debugging calls for missing structure/union elements
(This used to be commit f3ff48204c)
2007-10-10 13:19:20 -05:00
Andrew Tridgell
7fded3c856 r8215: switched the pull side of the ejs generator over to the recursive LEVELS based approach.
This allows for much more complex structure mappings to be generated.
(This used to be commit 49fc14d132)
2007-10-10 13:19:20 -05:00
Andrew Tridgell
ceb277ced9 r8213: I've started to understand the LEVELS stuff in pidl much better now,
and have re-coded the push side of the ejs generator to use it
properly. It ends up being very neat and small, and should handle much
more complex structures (like arrays of pointers to unions etc).

Also added push side support for unions. This should get more of the
echo pipe working via ejs.
(This used to be commit 2e306be1d8)
2007-10-10 13:19:20 -05:00
Andrew Tridgell
65ddc6e9b9 r8200: - added stub functions for union pull/push
- kill the js interpreter with an exception on internal errors
(This used to be commit 5f062d7148)
2007-10-10 13:19:19 -05:00
Andrew Tridgell
f44b9ae3e6 r8198: - handled push/pull of simple strings in ejs
- improved the error handling, so the ejs wrappers don't just ignore a type they
  don't handle, instead an exception is issued saying what isn't handled
(This used to be commit a77c2aa860)
2007-10-10 13:19:19 -05:00
Andrew Tridgell
74ac1686d5 r8195: - fixed handling of simple arrays. To keep the logic simple, I moved to making all push
functions taking a constant pointer to the type rather than having a different calling
  convention for scalars and pointers

- fixed the setting of the 'length' element in arrays
(This used to be commit 431b4b6888)
2007-10-10 13:19:18 -05:00
Andrew Tridgell
3605d2d7ab r8194: delete the old hand-written ejs code for echo_AddOne. This is now
autogenerated by pidl
(This used to be commit 697b67ed57)
2007-10-10 13:19:18 -05:00
Andrew Tridgell
7c3fc18315 r8192: updated the glue code for the generated ejs functions from pidl
only handles a small subset of all IDL files so far
(This used to be commit 14b6436cc5)
2007-10-10 13:19:18 -05:00
Andrew Tridgell
319f19eb90 r8114: fixed the build after tpots ejs commit ....
(This used to be commit 8649945cf9)
2007-10-10 13:19:10 -05:00
Tim Potter
766e8e1acb r8105: Add ejsrpc push/pull functions for uint16 and uint8.
(This used to be commit ee27943e21)
2007-10-10 13:19:08 -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
c36e1ae46c r7928: Add rename, unlink and list commands.
list() returns a list of strings, but maybe it should be a list of
objects with size, attrib, short name etc.
(This used to be commit 696aa182d5)
2007-10-10 13:18:51 -05:00
Tim Potter
ae73a40ad4 r7924: Add mkdir() and rmdir() functions.
Write a macro to check tree handle parameters.
(This used to be commit 043feb131f)
2007-10-10 13:18:51 -05:00
Tim Potter
864de2a4ab r7922: Comment out complicated connect/session/tree API for the moment. Replace
with tree_connect() and tree_disconnect() functions.
(This used to be commit 9ed763f7fa)
2007-10-10 13:18:50 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Tim Potter
487d1afe30 r7570: Add tree, session and socket disconnect ejs functions.
(This used to be commit 63577628b0)
2007-10-10 13:18:10 -05:00
Andrew Bartlett
00e2b7c1b4 r7530: Simply calling convention of lp_load().
This always loads all the services, as we now don't have an easy way
to split out smbd.

Andrew Bartlett
(This used to be commit 990e061939)
2007-10-10 13:18:07 -05:00
Tim Potter
fb3874bfac r7505: Add more argument forms for session_setup().
Throw an exception if tree connect fails.
(This used to be commit 5b67f2c3d9)
2007-10-10 13:18:01 -05:00
Tim Potter
ae23fe35e2 r7501: Fix credential initialisation in ejs session setup. Implement four
arg and anonymous version of command.

Implement ejs tconx.
(This used to be commit 3b7df1037d)
2007-10-10 13:18:01 -05:00
Tim Potter
9e555f75e2 r7500: Initialise module subsystems.
(This used to be commit 564dfe14d0)
2007-10-10 13:18:01 -05:00
Tim Potter
16a5d7c175 r7477: Add MPR_TYPE_PTR to ejs_typeof().
(This used to be commit 8574f64ca2)
2007-10-10 13:17:57 -05:00
Andrew Tridgell
6ef2a41aa1 r7461: this is the start of some code for mapping IDL onto ejs. This is hand
written code, and it doesn't work or even compile yet. I am committing
it to make it easier to discuss the approach with jelmer and tpot.

The intention is that this code will eventually end up being mostly
auto-generated (with the utility functions split out, just like
librpc/ndr/*.c)
(This used to be commit 30e876e9c2)
2007-10-10 13:17:55 -05:00
Tim Potter
aa7b6b3ea5 r7457: Return an ejs C pointer object from the ejs connect() function.
Add a session_setup() function that does an anonymous session setup.  Will
add credential passing later.
(This used to be commit 832332de5d)
2007-10-10 13:17:55 -05:00
Tim Potter
0b119901d8 r7422: Create a ejs object to wrap a smbcli_transport pointer.
(This used to be commit a55e40651d)
2007-10-10 13:17:51 -05:00
Andrew Tridgell
3feec91e68 r7355: this should fix the link problem metze hit with smbscript
(This used to be commit 067255909e)
2007-10-10 13:17:46 -05:00
Tim Potter
6eae7eb3c4 r7351: Start of ejs smb client library. I need to figure out a nice API here
that doesn't expose too much of the cifs protocol but still allows
people to do neat things.

Also, talloc lifetimes need to be thought about properly.
(This used to be commit 8062e808ef)
2007-10-10 13:17:45 -05:00
Tim Potter
8a2e208e45 r7350: Remove unused label.
(This used to be commit ada0045957)
2007-10-10 13:17:45 -05:00
Simo Sorce
791db4bf72 r7268: allocate the strings to avoid them disappearing under our feet
(This used to be commit ddd7454cb3)
2007-10-10 13:17:34 -05:00
Simo Sorce
b7bc13209f r7267: REMOTE_HOST is a better choice
(This used to be commit 41bae267e2)
2007-10-10 13:17:34 -05:00
Tim Potter
f84d007c43 r7266: Split the different types of js function defines into separate files,
as there are going to be a lot more of them.
(This used to be commit b086768589)
2007-10-10 13:17:34 -05:00
Tim Potter
32f2e9806b r7263: Exit smbscript with the intepreter return value (defaults to 0).
Change the exit value for an exception, usage error and other non-js
errors to 127 which is kinda like the return value for the system(3)
function.
(This used to be commit c77a232b11)
2007-10-10 13:17:33 -05:00
Tim Potter
d6555cadb7 r7262: Add a length property to ARGV array.
(This used to be commit 4b775c619b)
2007-10-10 13:17:33 -05:00
Tim Potter
b124351079 r7261: Pass by reference is done in js via MPR_TYPE_OBJECT. Update argument
parsing and example for resolveName().
(This used to be commit 1a4a549317)
2007-10-10 13:17:33 -05:00
Tim Potter
383c5fb68a r7255: Change syntax of resolveName() js function to be more like the
resolve_name() C function.  I can't figure out how to return variables
by reference though.  Writing to argv[] doesn't seem to work.
(This used to be commit aef99859f2)
2007-10-10 13:17:32 -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
Simo Sorce
266c37e5dc r7238: Add pam auth support in swat
(This used to be commit 8a98572a3b)
2007-10-10 13:17:30 -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
c1b95bd467 r7223: Advance script past interpreter line.
(This used to be commit 31b9fadbed)
2007-10-10 13:17:27 -05:00
Tim Potter
afeaf137c4 r7215: Convert smbscript to use ejsEvalScript() and file_load() instead of
ejsEvalFile().

Still need to add advancement of the script past the hash-bang line but
it's home time now!!
(This used to be commit 14a2053c04)
2007-10-10 13:17:27 -05:00