1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-03 04:23:50 +03:00
Commit Graph

321 Commits

Author SHA1 Message Date
Martin Pool
001779dffd Remove dead code for packing buffers which has now been reimplemented. -
Martin Pool
62ca27d140 Remove dead code for packing buffers which has now been reimplemented. -
Martin Pool
4a18526257 Remove non-integer Pointer values, which are no longer supported. -
Tim Potter
130c1d0765 Sync with HEAD. -
Martin Pool
2480d385db Rewrite all the packing stuff so that it converts 'f' strings to CP850
on encoding.  (Tough luck if your Samba codepage is not 850.)  It's
much cleaner and possibly more efficient now too: just build one big
list of strings, then zip it up at the end.

Still need to do this for unpacking.
-
Tim Potter
92c76e16fa Sync up python stuff from HEAD. -
Tim Potter
64e04380f7 Added enumprinterkey function.
Stub for deleteprinterkey.
-
Tim Potter
acecee6f2b 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.
-
Martin Pool
dd73568f97 pytdbpack_unpack: Clean up, and correct the handling of '$'. -
Martin Pool
2a492c4854 Add another test case for repeated-unpack ('$') -
Martin Pool
248067931a pytdbpack_pack_data: Allow first argument to be any kind of Number,
not just an Integer.  Coerce appropriately.
-
Martin Pool
db67c5f7e5 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.
-
Martin Pool
49a0ba46e6 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.
-
Martin Pool
db2c393dd4 Update test cases. -
Martin Pool
d72b144e03 pytdbpack_unpack: Handle unpacking Buffers into (LEN, DATA): form list
by appending, rather than preallocating.
-
Martin Pool
7827536c15 Add more test cases that now work. -
Martin Pool
2085595565 pytdbpack_pack_data: Allow 'd' and 'w' formats to take either Integer
or Long arguments.
-
Martin Pool
2593e15883 Make sure uint32 unpacking is unsigned, and generates a Python long so
that it can represent all the unsigned values
-
Martin Pool
a9c2817c79 Re-add some tests which do work with both implementations -
Martin Pool
6be885da2c Comment out test cases where the old and new parser are different. -
Martin Pool
30525aee33 pytdbpack_calc_reqd_len: Correct calculation of packed length of
string types
-
Martin Pool
20d88a7d1e 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.
-
Martin Pool
631945a03a test_pack_extra: Add additional cases.
test_pack_failures: Remove cases for which old code is too lax.
-
Martin Pool
12c3bb99a5 test_pack_extra: Better way of testing packing with extra values. -
Martin Pool
0c1cfe5598 pytdbpack_calc_reqd_len: It's no longer an error to supply more data
values than are consumed.
-
Martin Pool
21e4186642 Doc -
Martin Pool
b0143e77d6 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.
-
Tim Potter
0310e539bb Sync with HEAD. -
Martin Pool
04cad599f4 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.
-
Martin Pool
1b681bd524 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.
-
Martin Pool
5ade138bb8 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.
-
Martin Pool
ed0e4a670d 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.
-
Tim Potter
6945e89e2d Fix boog in argument list for nt_create_andx. -
Tim Potter
3a7f8a568e Added close and unlink functions. -
Tim Potter
06caeed588 Fixed bug in session setup kwlist.
Added some basic error handling.  Just throw a RuntimeError exception
on error.
-
cvs2svn Import User
d39b53ba54 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. -
Martin Pool
44dd7746ed 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.
-
Martin Pool
2dc4373727 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.
-
Tim Potter
e27d3d20e3 The libsmb module uses py_ntsec.o -
Tim Potter
3fd568ef5c Fixed up tconx function. Implemented nt_create_andx, query_secdesc
and set_secdesc functions.
-
Tim Potter
b740c7e505 Whoops - this should be in py_smb.c -
Martin Pool
6139ab3cbc Give better error messages for TypeError, which will arise if e.g. you
try to pack an Int using a string tdbpack format.
-
Tim Potter
d3e88cb96f Merge. -
Tim Potter
a4790ba42c More cleanups of validation functions. -
Tim Potter
7f45bad319 Zero some more return values. -
Tim Potter
174c8ca814 Merge of validiation cleanups from head. -
Tim Potter
121db5b682 level should be a uint32 in enum_ports function. -
Tim Potter
672c07e243 Stricter validation in python->C conversion functions. -
Tim Potter
35413be0ac Fixed DRIVER_INFO_3 conversion function to check for dependent_files
key.
-
Tim Potter
b7ef2e8b41 Added stubs for query/set security descriptors on files. Not even close to
working yet.
-