1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

22 Commits

Author SHA1 Message Date
Andrew Bartlett
8440dda3cb pysmb: Use pytalloc_BaseObject_PyType_Ready()
This changes pysmb to use talloc.BaseObject() just like the PIDL output

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:30 +01:00
Andrew Bartlett
c763253f05 pysmb: Do not use pytalloc_Object directly
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:30 +01:00
Andrew Bartlett
05b99bed8c pysmb: Rework py_smb_new() to use pytalloc_steal()
This avoids casting to pytalloc_Object directly

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:29 +01:00
Andrew Bartlett
9a34a1567b pysmb: Use pytalloc_get_mem_ctx()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:29 +01:00
Andrew Bartlett
a2013c3a5a pysmb: Use pytalloc_get_ptr()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:29 +01:00
Petr Viktorin
02980268e8 Remove use of the "staticforward" macro
This macro was used for compatibility with broken compilers.
Since Python 2.3, it is always defined as `static`, and only exists
"for source compatibility with old C extensions".

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-01-22 10:51:07 +01:00
Matthias Dieter Wallnöfer
0c2fbe5a0c samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4
http://www.python.org/doc//current/c-api/none.html

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Thu Jan  9 16:27:47 CET 2014 on sn-devel-104
2014-01-09 16:27:47 +01:00
Andrew Bartlett
d6c7e9b1ed smbd: Remove NT4 compatability handling in posix -> NT ACL conversion
NT4 is long dead, and we should not change which ACL we return based
on what we think the client is.  The reason we should not do this, is
that if we are using vfs_acl_xattr then the hash will break if we do.
Additionally, it would require that the python VFS interface set the
global remote_arch to fake up being a modern client.

This instead seems cleaner and removes untested code (the tests are
updated to then handle the results of the modern codepath).

The supporting 'acl compatability' parameter is also removed.

Andrew Bartlett

Reviewed by: Jeremy Allison <jra@samba.org>
2012-11-13 22:48:19 +01:00
Amitay Isaacs
e3828d4ccb s4-pysmb: Add deltree() method to remove directory and its contents
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:41 +10:00
Amitay Isaacs
0c29804bb0 s4-pysmb: Parse security info as an unsigned integer 2012-06-21 09:41:46 +10:00
Richard Sharpe
2c322ca95a Fix some of the issues that Jelmer identified in my first patch. This might be
changed again, especially when I figure out how to return the file as an
object.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Mon Apr  2 01:43:44 CEST 2012 on sn-devel-104
2012-04-02 01:43:44 +02:00
Richard Sharpe
36101d3fa4 Add an open and close method to samba.smb.SMB so we can open and close files.
Also, fix up some documentation.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Sun Apr  1 16:29:52 CEST 2012 on sn-devel-104
2012-04-01 16:29:52 +02:00
Richard Sharpe
cb7220d721 Fix the PyDoc comments in samba.smb.SMB and add a security_info argument to both get_acl and set_acl to allow the caller to specify what info is wanted. Defaults to 0 which means all info.
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Mon Mar 26 04:05:25 CEST 2012 on sn-devel-104
2012-03-26 04:05:24 +02:00
Amitay Isaacs
b47959a5c5 s4-libcli: pysmb: Fix typo in secinfo_flags
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar  7 10:56:09 CET 2012 on sn-devel-104
2012-03-07 10:56:09 +01:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Amitay Isaacs
f854209996 s4-libcli: Fix the fd leak. Close open file descriptor before return.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Aug  3 07:49:12 CEST 2011 on sn-devel-104
2011-08-03 07:49:12 +02:00
Amitay Isaacs
65dcf82e64 s4-libcli: get_acl and set_acl require raw_open to set security descriptor
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03 14:26:04 +10:00
Amitay Isaacs
52d602335b s4-libcli: Check if short_name is not null, before converting to python string
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03 14:26:02 +10:00
Amitay Isaacs
38b8d38b30 s4-libcli: Replace smb_composite_connect() with smb_full_connection()
Python smb connection now uses smb_full_connection method.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03 14:26:00 +10:00
Amitay Isaacs
2d90cafa10 s4-libcli: Added python SMB methods for mkdir(), rmdir(), chkpath()
Updated docstrings for all methods.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03 14:25:46 +10:00
Amitay Isaacs
43ff229b9a s4-libcli: Initialize stack structure variables to zero.
Update do_smb_connect function to return NTSTATUS rather than raise
python exception on error. Error checking done in py_smb_new().

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:54 +10:00
Amitay Isaacs
20f8a8ea30 s4-libcli: Added python interface for file I/O using SMB
This module will support file system access using SMB.

based on smb_composite - loadfile(), savefile()
based on raw -  getacl(), setacl()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00