summaryrefslogtreecommitdiff
path: root/source3/modules/gpfs.c
diff options
context:
space:
mode:
authorMathias Dietz <mdietz@de.ibm.com>2009-05-27 12:03:12 +0200
committerVolker Lendecke <vl@samba.org>2009-06-02 17:03:59 +0200
commit15e10c6a84c450fd5bc1b50a45bb1cfa049fb00d (patch)
treeef1804ad452a64e5071098255ac85a293107b332 /source3/modules/gpfs.c
parent011a5058005554b977f9eaaefbbd5bd50b3109bc (diff)
downloadsamba-15e10c6a84c450fd5bc1b50a45bb1cfa049fb00d.tar.gz
samba-15e10c6a84c450fd5bc1b50a45bb1cfa049fb00d.tar.bz2
samba-15e10c6a84c450fd5bc1b50a45bb1cfa049fb00d.zip
Store winattrs in GPFS
1. Store win attributes in gpfs instead of posix bits. 2. use of path based winattr calls of gpfs. Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
Diffstat (limited to 'source3/modules/gpfs.c')
-rw-r--r--source3/modules/gpfs.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c
index 9fc4524654..d20c024ccd 100644
--- a/source3/modules/gpfs.c
+++ b/source3/modules/gpfs.c
@@ -27,6 +27,7 @@
static bool gpfs_share_modes;
static bool gpfs_leases;
static bool gpfs_getrealfilename;
+static bool gpfs_winattr;
static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny);
static int (*gpfs_set_lease_fn)(int fd, unsigned int leaseType);
@@ -34,6 +35,8 @@ static int (*gpfs_getacl_fn)(char *pathname, int flags, void *acl);
static int (*gpfs_putacl_fn)(char *pathname, int flags, void *acl);
static int (*gpfs_get_realfilename_path_fn)(char *pathname, char *filenamep,
int *buflen);
+static int (*gpfs_set_winattrs_path_fn)(char *pathname, int flags, struct gpfs_winattr *attrs);
+static int (*gpfs_get_winattrs_path_fn)(char *pathname, struct gpfs_winattr *attrs);
bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
@@ -149,6 +152,28 @@ int smbd_gpfs_get_realfilename_path(char *pathname, char *filenamep,
return gpfs_get_realfilename_path_fn(pathname, filenamep, buflen);
}
+int get_gpfs_winattrs(char *pathname,struct gpfs_winattr *attrs)
+{
+
+ if ((!gpfs_winattr) || (gpfs_get_winattrs_path_fn == NULL)) {
+ errno = ENOSYS;
+ return -1;
+ }
+ DEBUG(0, ("gpfs_get_winattrs_path:open call %s\n",pathname));
+ return gpfs_get_winattrs_path_fn(pathname, attrs);
+}
+
+int set_gpfs_winattrs(char *pathname,int flags,struct gpfs_winattr *attrs)
+{
+ if ((!gpfs_winattr) || (gpfs_set_winattrs_path_fn == NULL)) {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ DEBUG(0, ("gpfs_set_winattrs_path:open call %s\n",pathname));
+ return gpfs_set_winattrs_path_fn(pathname,flags, attrs);
+}
+
static bool init_gpfs_function_lib(void *plibhandle_pointer,
const char *libname,
void *pfn_pointer, const char *fn_name)
@@ -207,11 +232,15 @@ void init_gpfs(void)
init_gpfs_function(&gpfs_putacl_fn, "gpfs_putacl");
init_gpfs_function(&gpfs_get_realfilename_path_fn,
"gpfs_get_realfilename_path");
+ init_gpfs_function(&gpfs_get_winattrs_path_fn,"gpfs_get_winattrs_path");
+ init_gpfs_function(&gpfs_set_winattrs_path_fn,"gpfs_set_winattrs_path");
+
gpfs_share_modes = lp_parm_bool(-1, "gpfs", "sharemodes", True);
gpfs_leases = lp_parm_bool(-1, "gpfs", "leases", True);
gpfs_getrealfilename = lp_parm_bool(-1, "gpfs", "getrealfilename",
True);
+ gpfs_winattr = lp_parm_bool(-1, "gpfs", "winattr", False);
return;
}
@@ -255,6 +284,18 @@ int smbd_gpfs_get_realfilename_path(char *pathname, char *fileamep,
return -1;
}
+int set_gpfs_winattrs(char *pathname,int flags,struct gpfs_winattr *attrs)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int get_gpfs_winattrs(char *pathname,struct gpfs_winattr *attrs)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
void init_gpfs(void)
{
return;