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

292 Commits

Author SHA1 Message Date
Tim Potter
cd5c47f473 Added chainlock, chainunlock, lock_bystring and unlock_bystring methods. -
Tim Potter
eb5d1a72dc Quieten compiler warning. -
Martin Pool
5d7d400d6c Doc -
Martin Pool
55e114f596 (Merge from APPLIANCE_HEAD)
CR1829: Fix memory leak when unpacking 'B' buffers in Python.

(PyList_Append creates a new reference to the added object, and so we
have to release the existing one.)
-
Tim Potter
0659351b25 Cleanup of header files for python extensions.
- combine py_foo_proto.h and py_foo.h
 - move #include of Python.h into one place so we can get rid of that
   annoying compiler warning about HAVE_FSTAT being redefined
-
Martin Pool
fe449328b2 Check return code from string_to_sid. -
Tim Potter
8e0d781995 Added SRVSVC pipe support. I've started implementing NetServerGetInfo() -
Andrew Tridgell
e3d00fa47d reverted this patch till I sort out the craziness with UNIHDR -
Andrew Tridgell
b9eff31b14 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
-
Tim Potter
232116d2db Rename a local variable to avoid a warning. -
Jeremy Allison
784d15761c Finish adding strings to all talloc_init() calls.
Jeremy.
-
Martin Pool
1e63dc101a CR1333: Fix memory leak when unpacking some structures.
* (pytdbunpack_item): PyList_Append creates an additional reference to
  the appended object.  Therefore, release the initial reference after
  it's added to the list.
-
Martin Pool
3bb4bd3ed6 * Ignore .pyc and .pyo files produced as a side-effect of running
Python examples.
-
Tim Potter
89be695b29 Some more tweaking for compilation of py_tdbpack. -
Tim Potter
739285ff69 FUNCTION_MACRO change broke the Python modules.
Also fix up string pasting (I thought this should only be a warning?)
-
Herb Lewis
243763d6eb use FILE_MACRO instead of __FILE__
use FUNCTION_MACRO instead of __FUNCTION_
-
Tim Potter
191c1596f5 Fixed silly bug. -
Jeremy Allison
6639693746 Fix comment - 850 -> iso8859-1
Jeremy.
-
Jeremy Allison
e88bbec2a0 Remove use of 'F' - make 'f' and 'p' do unix (iso8859-1) encoding.
Jeremy.
-
Tim Potter
93306f581e Fix some argument checking bugs found by testsuite. -
Tim Potter
6f1d48555f Added some extra code to test absence/presence of LM and NT passwords. -
Tim Potter
9e871cc256 Fixed some compiler warnings. -
Tim Potter
4580e16908 Fixed some globals that escaped the recent globalcide. -
Martin Pool
ff1244c457 Add support for new 'F' format, which is a string in the default
codepage.
-
Tim Potter
9f9347bc03 Fix typo in docstring. -
Martin Pool
8cbaea2afa Rename unpack_* functions to be consistent
Decode CP850 strings when unpacking

Add variable giving default encoding name
-
Martin Pool
e62baf3a76 Rename pytdbpack_unpack -> pytdbunpack -
Martin Pool
7863c948b7 Just reorder functions to put related ones together -
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. -
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
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. -