Tim Potter
f4766f4900
Moved function to parse a list of unicode strings into util file.
...
It's now used in parsing printer driver structures and the response
from the enumprinterkey rpc.
(This used to be commit acecee6f2bb92c4992078f4fe2dfae4414f43482)
2002-11-06 23:34:12 +00:00
Martin Pool
6b0761b327
pytdbpack_unpack: Clean up, and correct the handling of '$'.
...
(This used to be commit dd73568f97ad51c93f096001058fd31fa14e88ae)
2002-11-06 01:59:57 +00:00
Martin Pool
618db4e739
Add another test case for repeated-unpack ('$')
...
(This used to be commit 2a492c4854d4c6469d8c7d21aa187fef6303b641)
2002-11-06 01:50:31 +00:00
Martin Pool
d7eac6c356
pytdbpack_pack_data: Allow first argument to be any kind of Number,
...
not just an Integer. Coerce appropriately.
(This used to be commit 248067931a2a8eeee86ea343bddf96d2bd727dbf)
2002-11-05 21:26:35 +00:00
Martin Pool
17356de921
pytdbpack_pack_data: If the first argument to a 'B' code is not an
...
Integer, raise an error rather than just returning Null, which breaks
the interpreter.
(This used to be commit db67c5f7e53b231fe217a29a15888e8895ce2229)
2002-11-05 21:22:14 +00:00
Martin Pool
af7ecaf61b
pytdbpack_pack_data: Oops, since B is separately encoded as buffer and
...
length we need separate counters traversing the format and value
sequences to pack them.
(This used to be commit 49a0ba46e6693bb819440d4ab40045afc4a7ae17)
2002-11-05 02:54:07 +00:00
Martin Pool
97d34f85c7
Update test cases.
...
(This used to be commit db2c393dd488dad2ce95f3b3cf0297d5b0159ae7)
2002-11-05 02:52:01 +00:00
Martin Pool
d6d94ee143
pytdbpack_unpack: Handle unpacking Buffers into (LEN, DATA): form list
...
by appending, rather than preallocating.
(This used to be commit d72b144e03b9a9cb3d676527ddc5b2d0e1ef42f8)
2002-11-05 00:24:32 +00:00
Martin Pool
e6aa69bac7
Add more test cases that now work.
...
(This used to be commit 7827536c15ac27ebcc4e9c342be6e203248195f6)
2002-11-04 23:10:47 +00:00
Martin Pool
3f9dac6948
pytdbpack_pack_data: Allow 'd' and 'w' formats to take either Integer
...
or Long arguments.
(This used to be commit 2085595565b99295d04a6663aad1ccac5bc1b657)
2002-11-04 23:08:53 +00:00
Martin Pool
0011607aca
Make sure uint32 unpacking is unsigned, and generates a Python long so
...
that it can represent all the unsigned values
(This used to be commit 2593e1588355643bb76a9b8869573fe38fd3bc3e)
2002-11-04 22:59:48 +00:00
Martin Pool
2137acf498
Re-add some tests which do work with both implementations
...
(This used to be commit a9c2817c79f675b82ace4e21df7fa123f9a995c3)
2002-11-04 22:50:24 +00:00
Martin Pool
a5a1e068bd
Comment out test cases where the old and new parser are different.
...
(This used to be commit 6be885da2ca0ee41db86c46625301b51858061af)
2002-11-04 22:48:06 +00:00
Martin Pool
feb15f90fe
pytdbpack_calc_reqd_len: Correct calculation of packed length of
...
string types
(This used to be commit 30525aee33237f5b17e1067a96d09b7ee0a516a6)
2002-11-04 22:29:03 +00:00
Martin Pool
859850faf7
Change to representing buffers ('B') as (LEN, STRING) in Python,
...
rather than as just a string. Makes the code more messy, but needed
for compatibility with existing PSA Python code which seems to be too
knotty to separate out.
(This used to be commit 20d88a7d1e2a6d2daca29c5ffff3781197a97b57)
2002-11-04 22:22:12 +00:00
Martin Pool
70cdcfb5b3
test_pack_extra: Add additional cases.
...
test_pack_failures: Remove cases for which old code is too lax.
(This used to be commit 631945a03a3bf4982177bc22ebccf096b2bb5b6c)
2002-11-04 22:01:25 +00:00
Martin Pool
5c2b4a8a5a
test_pack_extra: Better way of testing packing with extra values.
...
(This used to be commit 12c3bb99a5f870b01ef389ddad1073fc92d2362c)
2002-11-04 21:57:53 +00:00
Martin Pool
fe61a53991
pytdbpack_calc_reqd_len: It's no longer an error to supply more data
...
values than are consumed.
(This used to be commit 0c1cfe559877d51090409d67f983a82bbbbaa7e2)
2002-11-04 21:56:24 +00:00
Martin Pool
ba09904001
Doc
...
(This used to be commit 21e41866425c6f8bf04b08b3edd5bf70caf56e32)
2002-11-04 20:34:50 +00:00
Martin Pool
b700eafad9
test_pack_extra: The old code does not complain when there are too
...
many data values for the format. Test that the new code behaves the
same way.
(This used to be commit b0143e77d64f6af977395cf39e50f35e46486157)
2002-11-04 20:34:25 +00:00
Martin Pool
f10a55e3be
test_pack_failures: The old code does not complain when there are too
...
many data values for the format, so we don't test that here.
test_large: New test case for packing/unpack a thousand values.
(This used to be commit 04cad599f40faf234b40090806bcd1ac0473470f)
2002-11-04 20:30:09 +00:00
Martin Pool
c56f478ded
pytdbpack_calc_reqd_len: Make exception be thrown correctly when a
...
non-string is used with a string format code. (It was being generated
but not thrown.)
Also call checked versions of some functions rather than FAST_*
versions.
(This used to be commit 1b681bd524764deaef657ef41c39d037ac7dcc7b)
2002-11-04 20:22:03 +00:00
Martin Pool
dc847082f3
test_pack_failures: The old and new code is not exactly the same about
...
error detection, so now we don't care what exact error is returned as
long as we get something.
(This used to be commit 5ade138bb815d3184fa57ff9cb548f78405059c5)
2002-11-04 20:04:16 +00:00
Martin Pool
06b055cea3
test_pack: Coercing a dictionary to a sequence as it is packed is not
...
compatible with the old code, and so it is removed from the test case.
(This used to be commit ed0e4a670d4d62b63afdaf7d9f13e39b98cdf1b2)
2002-11-04 19:54:06 +00:00
Tim Potter
44637311ea
Fix boog in argument list for nt_create_andx.
...
(This used to be commit 6945e89e2d10743635f01420c83d405a2d4cb356)
2002-10-30 14:52:53 +00:00
Tim Potter
64c6fd21c1
Added close and unlink functions.
...
(This used to be commit 3a7f8a568e9d1608c2a065e0b98488e2d068911c)
2002-10-29 04:39:33 +00:00
Tim Potter
5324adb825
Fixed bug in session setup kwlist.
...
Added some basic error handling. Just throw a RuntimeError exception
on error.
(This used to be commit 06caeed588f702814be76a2b2aa7ed43504adef5)
2002-10-21 21:21:33 +00:00
Martin Pool
23e6084358
Test both new samba.tdbpack and oldtdbutil pack/unpack routines.
...
This makes the test suite fail because at the moment they are in fact
not behaving the same way.
(This used to be commit 44dd7746ede7f7f9efcf7dabcd351b1d800e535c)
2002-10-21 11:44:26 +00:00
Martin Pool
d70d4ef34b
Import old pure Python version of tdbpack/unpack, so that we can do
...
compatibility testing against the shiny new C version.
This version is slightly modified to not call codepage conversion
routines, and renamed tdbutil->oldtdbutil.
(This used to be commit 2dc4373727f73a46cd6135413e50917fb7fa538b)
2002-10-21 11:13:53 +00:00
Tim Potter
e0d317dd16
The libsmb module uses py_ntsec.o
...
(This used to be commit e27d3d20e3c51fc04f37d92c24f38f91b2d1e1e4)
2002-10-21 09:54:41 +00:00
Tim Potter
91895706b7
Fixed up tconx function. Implemented nt_create_andx, query_secdesc
...
and set_secdesc functions.
(This used to be commit 3fd568ef5c984f089e7799d9ff55395330716641)
2002-10-21 09:53:31 +00:00
Tim Potter
4eb2eab364
Whoops - this should be in py_smb.c
...
(This used to be commit b740c7e5050b18bc06865451bed3daf3ae09c609)
2002-10-21 08:23:20 +00:00
Martin Pool
3b8d11fe50
Give better error messages for TypeError, which will arise if e.g. you
...
try to pack an Int using a string tdbpack format.
(This used to be commit 6139ab3cbca3fc2969d1e578b38394b1f6aeb9c3)
2002-10-21 07:41:08 +00:00
Tim Potter
771fc528eb
More cleanups of validation functions.
...
(This used to be commit a4790ba42cc6ee4086dafbc64b1dba790a6c3583)
2002-10-21 04:47:29 +00:00
Tim Potter
d897c63fb5
Zero some more return values.
...
(This used to be commit 7f45bad319ace07a5bfc21465a0db919131dd608)
2002-10-21 04:44:44 +00:00
Tim Potter
354878f76f
level should be a uint32 in enum_ports function.
...
(This used to be commit 121db5b6821df9c6ec05adb2d35c2dde930736f2)
2002-10-21 04:17:43 +00:00
Tim Potter
69e2a9d7fa
Stricter validation in python->C conversion functions.
...
(This used to be commit 672c07e2432299e3b1015af524dc5c124f61f904)
2002-10-21 04:16:12 +00:00
Tim Potter
7f62309268
Fixed DRIVER_INFO_3 conversion function to check for dependent_files
...
key.
(This used to be commit 35413be0ac39ce52f009f7750f23b41728d8a35c)
2002-10-21 04:12:47 +00:00
Tim Potter
7c6400a78f
Added stubs for query/set security descriptors on files. Not even close to
...
working yet.
(This used to be commit b7ef2e8b41bd6a7225b9f21c65c42b8ef0f82a32)
2002-10-20 20:43:26 +00:00
Jim McDonough
fb3d215b39
Add extra parm to cli_full_connection call. Tim, you should probably look at this.
...
(This used to be commit a9f632ed5d3d033849c25efac419b21e830c5069)
2002-10-18 17:29:20 +00:00
Tim Potter
4af2e30ecf
make proto
...
(This used to be commit 86c884c3a129d12dc77332c38484bef78c66440e)
2002-10-17 04:48:08 +00:00
Tim Potter
14df81590c
open_pipe_creds() now takes a pipe index instead of a pipe name.
...
(This used to be commit 3a0a30beda4b8be0038c98ccc6f8f01c6dae386a)
2002-10-17 04:45:25 +00:00
Tim Potter
dae2b02f78
Fix for new arguments of cli_nt_session_open()
...
(This used to be commit cfb0c12eb6412c2cc84785c17ab2f6c89916aa56)
2002-10-17 04:40:53 +00:00
Tim Potter
5b71a0055f
The security descriptor in a PRINTER_INFO_2 could be NULL. (Bong?)
...
(This used to be commit 7ce782c20c6b9e515a2fa831315ae14c66d322ee)
2002-09-25 06:25:02 +00:00
Tim Potter
8eda50793e
Remove hardcoded -I stuff. Hooray!
...
(This used to be commit 105ff7c5400a6b79613b6a3b72808124b17ddc60)
2002-09-19 05:49:14 +00:00
Tim Potter
86c7c460ca
Bong! The devmode could be NULL. Don't crash if this is the case.
...
(This used to be commit 3ce8f8c50c0adcedc38bf2812b7e9fae78942458)
2002-09-19 05:39:03 +00:00
Tim Potter
a39dcb606d
Fixed bug in keyword args for enumprinterdataex
...
(This used to be commit c7845b3c43f7167f2c695722bc9923ff666ade76)
2002-09-19 05:29:14 +00:00
Tim Potter
d3a661453e
Moving to subdirectory.
...
(This used to be commit 154c59c8f92b9f735f4e1e7c8c42692c959996f1)
2002-09-19 00:26:07 +00:00
Tim Potter
15fdb18dd7
Implement printerdata_ex as Python dictionary. Read only at the moment.
...
(This used to be commit 739ea89eb3ab49e5dccddfa767812811b413e67d)
2002-09-19 00:14:01 +00:00
Tim Potter
e7ff6ab840
Display the repr() of non-string dictionary values.
...
(This used to be commit 3c6975c711d87755f0532147f9aaecb224159f43)
2002-09-18 08:16:22 +00:00