diff options
author | Jeremy Allison <jra@samba.org> | 2004-11-12 23:42:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:16 -0500 |
commit | f995b164b98221e224661e370d61ad08dadb2986 (patch) | |
tree | ab48f2b1ec70e8ee0aadacb6adc5934db8a7addc /source3/libsmb/clifsinfo.c | |
parent | a13b603b79e170683b6b5b339d3494d32a9eaf39 (diff) | |
download | samba-f995b164b98221e224661e370d61ad08dadb2986.tar.gz samba-f995b164b98221e224661e370d61ad08dadb2986.tar.xz samba-f995b164b98221e224661e370d61ad08dadb2986.zip |
r3713: Implementation of get posix acls in UNIX extensions. Passes valgrind.
Need to add printout functions in client and set posix acl in server.
SteveF - take a look at this for the cifsfs client !
Once this is working and tested the next step is to write this up for
the UNIX extensions spec. documents.
Jeremy.
(This used to be commit 1bd3f133442a472b4718b94a636f2fec89a2e0dc)
Diffstat (limited to 'source3/libsmb/clifsinfo.c')
-rw-r--r-- | source3/libsmb/clifsinfo.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c index 00fe189e9a9..22c8bff3ba0 100644 --- a/source3/libsmb/clifsinfo.c +++ b/source3/libsmb/clifsinfo.c @@ -20,6 +20,64 @@ #include "includes.h" +/**************************************************************************** + Get UNIX extensions version info. +****************************************************************************/ + +BOOL cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor, + uint32 *pcaplow, uint32 *pcaphigh) +{ + BOOL ret = False; + uint16 setup; + char param[2]; + char *rparam=NULL, *rdata=NULL; + unsigned int rparam_count=0, rdata_count=0; + + setup = TRANSACT2_QFSINFO; + + SSVAL(param,0,SMB_QUERY_CIFS_UNIX_INFO); + + if (!cli_send_trans(cli, SMBtrans2, + NULL, + 0, 0, + &setup, 1, 0, + param, 2, 0, + NULL, 0, 560)) { + goto cleanup; + } + + if (!cli_receive_trans(cli, SMBtrans2, + &rparam, &rparam_count, + &rdata, &rdata_count)) { + goto cleanup; + } + + if (cli_is_error(cli)) { + ret = False; + goto cleanup; + } else { + ret = True; + } + + if (rdata_count < 12) { + goto cleanup; + } + + *pmajor = SVAL(rdata,0); + *pminor = SVAL(rdata,2); + *pcaplow = IVAL(rdata,4); + *pcaphigh = IVAL(rdata,8); + + /* todo: but not yet needed + * return the other stuff + */ + +cleanup: + SAFE_FREE(rparam); + SAFE_FREE(rdata); + + return ret; +} BOOL cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr) { |