1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

3570 Commits

Author SHA1 Message Date
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 b086768589ee27de6616945bbea42b18b40d25d5)
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 c77a232b1152a27e2d8ffb719aefba6c6b2ba6df)
2007-10-10 13:17:33 -05:00
Tim Potter
d6555cadb7 r7262: Add a length property to ARGV array.
(This used to be commit 4b775c619b7abed52d158ab70505320753a0c9cb)
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 1a4a54931733ebfa743401a184fe460c044427b4)
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 aef99859f28570b60f4fefe2981160269f6eb02a)
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 2fa6f7bb2b8390f6486f6531212b556e98a6c528)
2007-10-10 13:17:32 -05:00
Simo Sorce
266c37e5dc r7238: Add pam auth support in swat
(This used to be commit 8a98572a3b5dba58181dc402dbebae5452656012)
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 d81d5f8317ca82a08e6fc38ef7313fad2e631281)
2007-10-10 13:17:28 -05:00
Tim Potter
c1b95bd467 r7223: Advance script past interpreter line.
(This used to be commit 31b9fadbed656f666f587a9dcb5a7627a2d388aa)
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 14a2053c045a2df1d68838900c833c2a15cb5a36)
2007-10-10 13:17:27 -05:00
Andrew Tridgell
a05bd5e9d6 r7135: make typeof() complient with ECMA 11.4.3
(This used to be commit 29ab4cc6cb244255ab75af7ae2076b51209f4f2d)
2007-10-10 13:17:21 -05:00
Tim Potter
4f1a5b7169 r7083: Add a ejs hook to the resolve_name() function.
We need to figure out what the best way to return NTSTATUS codes.  In the
Python wrappers I threw an exception which could be caught by some code,
but I'm not sure whether this is possible in ejs.
(This used to be commit 6911e46c6a576a379ea06f9ba3ef6a62653170f0)
2007-10-10 13:17:14 -05:00
Tim Potter
520e2258c9 r7082: Call load_interfaces() in smbscript initialisation.
(This used to be commit 54051bf8bbb18653adafb37cc6181617ca60b781)
2007-10-10 13:17:13 -05:00
Tim Potter
18fa5ea9ef r7081: Add mprToInt() function.
(This used to be commit 790a46f53bd5b6994cbf6aed670df1407a44e2f3)
2007-10-10 13:17:13 -05:00
Tim Potter
0b2f972c8a r7080: Fix typo in error message.
(This used to be commit fcf177c86e2bfbc993352b80824487e5df0a3f63)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
09e00bbdc1 r7078: - fix an uninitialised variable in smbscript
- fixed handle passing in the smb/ejs interface calls, so they can be called
  safely from esp
(This used to be commit 45ea1b64413de577366939b2106f657f6c47b1bd)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
fe17411203 r7077: pull in a bunch more libs for smbscript. I plan on making a whole lot
of internal functions available to ejs, including rpc functions.

This should hopefully fix the link on solaris10 as well
(This used to be commit caceb31be841041a0e20c7e261badad2cce82c6a)
2007-10-10 13:17:13 -05:00
Andrew Tridgell
f477a74129 r7075: added support for ARGV[] in ejs scripts
(This used to be commit 3db568eb6bb383c4c1e1fd0c7f043a9914dcc3cc)
2007-10-10 13:17:12 -05:00
Andrew Tridgell
8f84f7cdec r7074: we should load all shares in smbscript
(This used to be commit 92f85507df2bce5e246484860a43748321f2291e)
2007-10-10 13:17:12 -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 e59ae64f60d388a5634559e4e0887e4676b70871)
2007-10-10 13:17:12 -05:00
Volker Lendecke
21f3a3921c r7069: Add a little usage message to smbscript and fix a compiler warning. My
compiler still complains about "handle" (scripting/ejs/smbscrip.c:46) possibly
not being initialized and to me this looks true.

Running smbscript with the trivial write("Hello, world\n"); also leaves some
memory around.

Volker
(This used to be commit 06d27a19213dc8fe6dfc948a5e8cbafa74db7a29)
2007-10-10 13:17:11 -05:00
Tim Potter
7756b990f3 r7066: Rename http_exception to ejs_exception.
(This used to be commit f2e59d3adfd7813c3c2090350f8ff2a99a5533e9)
2007-10-10 13:17:11 -05:00
Tim Potter
14ade23914 r7065: Move ejs from web_server to lib so it can be shared with smbscript.
(This used to be commit b83dc8fbfb9ffe30654bc4869398f50dd9ccccb7)
2007-10-10 13:17:11 -05:00
Tim Potter
de850cb754 r7064: Clean up handle parameter passing after peeking at tridge's ejstest.c
(This used to be commit 805b6c7cf0f1e05fbb690bdfc93938747e13e6cd)
2007-10-10 13:17:11 -05:00
Tim Potter
e95c8f1911 r7063: Do error checking on the ejs functions.
Tridge says there is a bug in defining per-engine CFunction's so move
calls to ejsDefineStringCFunction() above the ejsOpenEngine() call.

Test script now works!
(This used to be commit 5e2458ae6c863ff29b85fff3d093f7f4fa9dc2be)
2007-10-10 13:17:10 -05:00
Tim Potter
10f428b607 r7062: Merge scripting/swig/config.mk with scripting/config.mk
(This used to be commit e14c00c4c1cc51dac9452c1e950445907d883e46)
2007-10-10 13:17:10 -05:00
Tim Potter
f52a740215 r7061: A ejs scripting client. This should allow javascript to be run in a
command line environment instead of inside the web server.

It doesn't work yet though, rather an exception is thrown when trying
to call ejsDefineStringCFunction().
(This used to be commit 3444cd5429dfef5a67d5bf7818ae08e4e8cc5ccc)
2007-10-10 13:17:10 -05:00
Tim Potter
17f1cf0950 r6592: Throw an IOError exception if tdb_open() or tdb_open_Ex() returns NULL.
(This used to be commit 99fb6b6badf1afeac21fdb5f1ce04c1749e1b7f7)
2007-10-10 13:16:29 -05:00
Tim Potter
c8d0e36312 r6591: Add some comments.
Use SWIG %rename to get rid of prefix on every tdb function.

Treat mode_t as an int so we can actually pass a mode argument to
tdb_open().
(This used to be commit 0abd03f70c5c63a915086eaf6e3a25b3087769bc)
2007-10-10 13:16:28 -05:00
Tim Potter
6950d5f895 r6590: Remove bogus library versioning variables from swig wrappers.
(This used to be commit 83a125ce576b1be613e010a5c9b4257f25909b05)
2007-10-10 13:16:28 -05:00
Tim Potter
9d87efb681 r6540: Implement a bunch more SAMR functions.
(This used to be commit 7ab240644ec6cfd0449df7e2dfe0eb1b8a52ccdb)
2007-10-10 13:16:24 -05:00
Tim Potter
5c6e1f81ce r6539: A patch from jbm:
- convert rpcclient to new credential code
  - allow anonymous connections
(This used to be commit f40977c42145e202ddfe50c9a7daad624b06cc59)
2007-10-10 13:16:24 -05:00
Tim Potter
c23d22e4f1 r6512: Refactor samr torture test to use the nicer OO interface instead of the
previous dictionary based SWIG interface (which was broken anyway).
(This used to be commit 16b7e503bdbe4da96158e504790b1501a99d6db3)
2007-10-10 13:16:21 -05:00
Tim Potter
5fef58af74 r6511: Implement GetUserPwInfo(), QueryUserInfo(), QueryUserInfo2().
(This used to be commit f9742de617b6f1f24b75ae5af18a476f03c0b732)
2007-10-10 13:16:21 -05:00
Tim Potter
93e41274c5 r6510: Initialise rid parameter in samr_RidToSid(). This is faulting for me
on win2k - not sure why.

Add dodgy implementations of QueryDisplayInfo{,2,3}()
(This used to be commit 2e44402751f77fcbd9c89299d8533e91207de49f)
2007-10-10 13:16:20 -05:00
Tim Potter
25601d2d67 r6508: Fix typo - yay testsuite.
(This used to be commit 61da936dbc491d0ec2d733d9ba155c3df01b8847)
2007-10-10 13:16:20 -05:00
Tim Potter
416434fbc4 r6507: Fix syntax error in GetAliasMembership().
Implement SetDomainInfo() which got lost somehow.
(This used to be commit 3055addde60687acdcf4e92dcb08e7f8dfdfb8f1)
2007-10-10 13:16:20 -05:00
Tim Potter
df13db69cc r6506: Rename parameter to GetDomPwInfo.
(This used to be commit 1542a13493bb9bf33d5f09dca273957bb4333862)
2007-10-10 13:16:20 -05:00
Tim Potter
c06297f776 r6469: Add CreateDomainGroup, GetAliasMembership.
(This used to be commit acf1d0a1b554736361f38bcd74961d4e6c1b12bd)
2007-10-10 13:11:40 -05:00
Tim Potter
6f036daaa4 r6329: Write tests for newly implemented alias functions.
(This used to be commit 30d0c9fb2ededb86e40b985820a426f8df84053b)
2007-10-10 13:11:32 -05:00
Tim Potter
0545dfe856 r6328: Fix bug in OpenAlias.
Implement DeleteDomAlias, QueryAliasInfo, SetAliasInfo,
AddAliasMember, and AddMultipleMembersToAlias.

Fix one of those annoying large integer warnings.
(This used to be commit 25ed39651b020c9e4bda1d8aa8e2d78f918be3a2)
2007-10-10 13:11:32 -05:00
Tim Potter
621588c9e6 r6327: Add LSA objects to dcerpc swig library.
(This used to be commit b6e883a613e35ec3d5541a45efb80345578e2460)
2007-10-10 13:11:32 -05:00
Tim Potter
041e467208 r6326: Add %array_functions for struct lsa_SidPtr.
Pull in the auto-generated interface file for the lsa pipe
(whaddayaknow it compiled first go!)
(This used to be commit fd884ec433c825759624a47541521cbd3d07f5a1)
2007-10-10 13:11:32 -05:00
Tim Potter
602be3fd49 r6324: Pass server name instead of binding string on command line (always use
ncacn_np for the moment).

Fix rpcclient to work with struct cli_credentials.
(This used to be commit 162d3609a1f46683151d201a5404d0456d76b726)
2007-10-10 13:11:31 -05:00
Tim Potter
86122d78e5 r6215: Add test for LookupNames. Fix CreateUser2 test.
(This used to be commit e3a69a73222ae3277c2d10d33c5c71b7a14da789)
2007-10-10 13:11:27 -05:00
Tim Potter
b796dc4077 r6214: Fix typo in DomainHandle.OpenUser() function.
Implement DomainHandle.LookupNames() function.

UserHandle.DeleteUser() closes the handle so don't try and close it
when the GC destroys the class instance.
(This used to be commit 57680163bcc1aa5c707a64dcd1d0998dbc9f0659)
2007-10-10 13:11:27 -05:00
Tim Potter
f0641cae5d r6213: Add %array_functions for struct samr_String so we can create and
access arrays of them.
(This used to be commit fc2b73d4d75f383108632935ba047890c816b283)
2007-10-10 13:11:26 -05:00
Tim Potter
3b64edcfff r6212: Treat uint8 and int8's as integers instead of chars. Swig maps a char
to a string when we really want an integer.
(This used to be commit 86c62b92e84a6eb1e756a7125777587583a9276e)
2007-10-10 13:11:26 -05:00
Tim Potter
2543885bf3 r6211: Use cli_credentials_set_{domain,username,password}() to fill in
command line arguments for credentials typemap.  Neat!
(This used to be commit a3e7d71463053101e743a930f2648269d63ecaca)
2007-10-10 13:11:26 -05:00
Tim Potter
d77e7cd774 r6210: Call cli_credentials_set_conf() when initialising credentials in
cli_credentials typemap.
(This used to be commit 1c88e71ec645d10648f01e0405d29a4a83bc4036)
2007-10-10 13:11:26 -05:00