static int connect_acl_tdb(struct vfs_handle_struct *handle, const char *service, const char *user) { struct db_context *db; int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); if (ret < 0) { return ret; } if (!acl_tdb_init(&db)) { SMB_VFS_NEXT_DISCONNECT(handle); return -1; } SMB_VFS_HANDLE_SET_DATA(handle, db, free_acl_tdb_data, struct db_context, return -1); /* Ensure we have "inherit acls = yes" if we're * using this module. */ DEBUG(2,("connect_acl_tdb: setting 'inherit acls = true' " "and 'dos filemode = true' for service %s\n", service )); lp_do_parameter(SNUM(handle->conn), "inherit acls", "true"); lp_do_parameter(SNUM(handle->conn), "dos filemode", "true"); return 0; }
static int connect_acl_tdb(struct vfs_handle_struct *handle, const char *service, const char *user) { int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); if (ret < 0) { return ret; } if (!acl_tdb_init()) { SMB_VFS_NEXT_DISCONNECT(handle); return -1; } /* Ensure we have the parameters correct if we're * using this module. */ DEBUG(2,("connect_acl_tdb: setting 'inherit acls = true' " "'dos filemode = true' and " "'force unknown acl user = true' for service %s\n", service )); lp_do_parameter(SNUM(handle->conn), "inherit acls", "true"); lp_do_parameter(SNUM(handle->conn), "dos filemode", "true"); lp_do_parameter(SNUM(handle->conn), "force unknown acl user", "true"); return 0; }
static int connect_acl_tdb(struct vfs_handle_struct *handle, const char *service, const char *user) { int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); bool ok; struct acl_common_config *config = NULL; if (ret < 0) { return ret; } if (!acl_tdb_init()) { SMB_VFS_NEXT_DISCONNECT(handle); return -1; } ok = init_acl_common_config(handle); if (!ok) { DBG_ERR("init_acl_common_config failed\n"); return -1; } /* Ensure we have the parameters correct if we're * using this module. */ DEBUG(2,("connect_acl_tdb: setting 'inherit acls = true' " "'dos filemode = true' and " "'force unknown acl user = true' for service %s\n", service )); lp_do_parameter(SNUM(handle->conn), "inherit acls", "true"); lp_do_parameter(SNUM(handle->conn), "dos filemode", "true"); lp_do_parameter(SNUM(handle->conn), "force unknown acl user", "true"); SMB_VFS_HANDLE_GET_DATA(handle, config, struct acl_common_config, return -1); if (config->ignore_system_acls) { DBG_NOTICE("setting 'create mask = 0666', " "'directory mask = 0777', " "'store dos attributes = yes' and all " "'map ...' options to 'no'\n"); lp_do_parameter(SNUM(handle->conn), "create mask", "0666"); lp_do_parameter(SNUM(handle->conn), "directory mask", "0777"); lp_do_parameter(SNUM(handle->conn), "map archive", "no"); lp_do_parameter(SNUM(handle->conn), "map hidden", "no"); lp_do_parameter(SNUM(handle->conn), "map readonly", "no"); lp_do_parameter(SNUM(handle->conn), "map system", "no"); lp_do_parameter(SNUM(handle->conn), "store dos attributes", "yes"); } return 0; }
static int connect_acl_tdb(struct vfs_handle_struct *handle, const char *service, const char *user) { struct db_context *db; int res; res = SMB_VFS_NEXT_CONNECT(handle, service, user); if (res < 0) { return res; } if (!acl_tdb_init(&db)) { SMB_VFS_NEXT_DISCONNECT(handle); return -1; } SMB_VFS_HANDLE_SET_DATA(handle, db, free_acl_tdb_data, struct db_context, return -1); return 0; }