This is the 'CIFS on CIFS' backend for Samba. It provides a NTVFS
backend that talks to a remote CIFS server. The primary aim of this
-backend is for debugging and development, although some poeple may
+backend is for debugging and development, although some people may
find it useful as a CIFS gateway.
There are two modes of operation: Password specified and delegated
in this module a "DATA_BLOB *file_key" is a blob that uniquely identifies
a file. For a local posix filesystem this will usually be a combination
of the device and inode numbers of the file, but it can be anything
- that uniquely idetifies a file for locking purposes, as long
+ that uniquely identifies a file for locking purposes, as long
as it is applied consistently.
*/
-/* this struct is typicaly attached to tcon */
+/* this struct is typically attached to tcon */
struct brl_context {
struct db_context *db;
struct server_id server;
/*
* if the notify_ptr is non NULL,
* it means that we're at the end of a pending lock
- * and the real lock is requested after the timout went by
+ * and the real lock is requested after the timeout went by
* In this case we need to remember the last_lock and always
* give FILE_LOCK_CONFLICT
*/
/*
- initialialise the IPC backend, registering ourselves with the ntvfs subsystem
+ initialise the IPC backend, registering ourselves with the ntvfs subsystem
*/
NTSTATUS ntvfs_ipc_init(TALLOC_CTX *ctx)
{
*/
uint64_t client_caps;
- /* some statictics for the management tools */
+ /* some statistics for the management tools */
struct {
/* the system time when the request arrived */
struct timeval request_time;
return NT_STATUS_OBJECT_NAME_INVALID;
}
if (p > p_start && (p[1] == '\\' || p[1] == '\0')) {
- /* see if it is definately a "\\" or
+ /* see if it is definitely a "\\" or
* a trailing "\". If it is then fail here,
* and let the next layer up try again after
* pvfs_reduce_name() if it wants to. This is
case '|':
return NT_STATUS_OBJECT_NAME_INVALID;
case '.':
- /* see if it is definately a .. or
+ /* see if it is definitely a .. or
. component. If it is then fail here, and
let the next layer up try again after
pvfs_reduce_name() if it wants to. This is
}
/*
- the equvalent of pread() on a stream
+ the equivalent of pread() on a stream
*/
ssize_t pvfs_stream_read(struct pvfs_state *pvfs,
struct pvfs_file_handle *h, void *data, size_t count, off_t offset)
/*
- the equvalent of pwrite() on a stream
+ the equivalent of pwrite() on a stream
*/
ssize_t pvfs_stream_write(struct pvfs_state *pvfs,
struct pvfs_file_handle *h, const void *data, size_t count, off_t offset)
}
/*
- the equvalent of truncate() on a stream
+ the equivalent of truncate() on a stream
*/
NTSTATUS pvfs_stream_truncate(struct pvfs_state *pvfs,
struct pvfs_filename *name, int fd, off_t length)
/*
* disable async requests in the wildcard case
- * untill we have proper tests for this
+ * until we have proper tests for this
*/
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
hash a string of the specified length. The string does not need to be
null terminated
- hash alghorithm changed to FNV1 by idra@samba.org (Simo Sorce).
+ hash algorithm changed to FNV1 by idra@samba.org (Simo Sorce).
see http://www.isthe.com/chongo/tech/comp/fnv/index.html for a
discussion on Fowler / Noll / Vo (FNV) Hash by one of it's authors
*/
/*
* make sure we cleanup files and searches before anything else
- * because there destructors need to acess the pvfs_state struct
+ * because there destructors need to access the pvfs_state struct
*/
for (f=pvfs->files.list; f; f=fn) {
fn = f->next;
}
/*
- initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
+ initialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
*/
NTSTATUS ntvfs_posix_init(TALLOC_CTX *ctx)
{
/*
- initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
+ initialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
*/
NTSTATUS ntvfs_simple_init(TALLOC_CTX *ctx)
{
-This directory contains OS depdendent interfaces to facilities that
+This directory contains OS dependent interfaces to facilities that
are only available on a few of our target systems, and require
substantial code to abstract.
}
/* using IN_MASK_ADD allows us to cope with inotify() returning the same
- watch descriptor for muliple watches on the same path */
+ watch descriptor for multiple watches on the same path */
mask |= (IN_MASK_ADD | IN_ONLYDIR);
/* get a new watch descriptor for this path */
};
/*
- initialialise the inotify module
+ initialise the inotify module
*/
NTSTATUS sys_notify_inotify_init(TALLOC_CTX *);
NTSTATUS sys_notify_inotify_init(TALLOC_CTX *ctx)
};
/*
- initialialise the linux lease module
+ initialise the linux lease module
*/
NTSTATUS sys_lease_linux_init(TALLOC_CTX *ctx)
{
-/*
+/*
Unix SMB/CIFS implementation.
- a pass-thru NTVFS module to setup a security context using unix
+ A pass-through NTVFS module to setup a security context using unix
uid/gid
Copyright (C) Andrew Tridgell 2004
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*(struct security_unix_token **)stack_ptr = sec_ctx;
if (samba_seteuid(0) != 0 || samba_setegid(0) != 0) {
DEBUG(0,("%s: Failed to change to root\n", location));
- return -1;
+ return -1;
}
} else {
/* called when we come out of a nesting level */
status = set_unix_security(sec_ctx);
talloc_free(sec_ctx);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("%s: Failed to revert security context (%s)\n",
+ DEBUG(0,("%s: Failed to revert security context (%s)\n",
location, nt_errstr(status)));
return -1;
}
priv->last_token = NULL;
ntvfs->private_data = priv;
- tevent_loop_set_nesting_hook(ntvfs->ctx->event_ctx,
+ tevent_loop_set_nesting_hook(ntvfs->ctx->event_ctx,
unixuid_event_nesting_hook,
&unixuid_nesting_level);
- /* we don't use PASS_THRU_REQ here, as the connect operation runs with
+ /* we don't use PASS_THRU_REQ here, as the connect operation runs with
root privileges. This allows the backends to setup any database
links they might need during the connect. */
status = ntvfs_next_connect(ntvfs, req, tcon);
ntvfs->private_data = NULL;
status = ntvfs_next_disconnect(ntvfs);
-
+
return status;
}
async setup
*/
static NTSTATUS unixuid_async_setup(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req,
+ struct ntvfs_request *req,
void *private_data)
{
NTSTATUS status;
set info on a open file
*/
static NTSTATUS unixuid_setfileinfo(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req,
+ struct ntvfs_request *req,
union smb_setfileinfo *info)
{
NTSTATUS status;
return status;
}
-/*
+/*
list files in a directory matching a wildcard pattern
*/
static NTSTATUS unixuid_search_first(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req, union smb_search_first *io,
- void *search_private,
+ struct ntvfs_request *req, union smb_search_first *io,
+ void *search_private,
bool (*callback)(void *, const union smb_search_data *))
{
NTSTATUS status;
/* continue a search */
static NTSTATUS unixuid_search_next(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req, union smb_search_next *io,
- void *search_private,
+ struct ntvfs_request *req, union smb_search_next *io,
+ void *search_private,
bool (*callback)(void *, const union smb_search_data *))
{
NTSTATUS status;
ops.name = "unixuid";
/* we register under all 3 backend types, as we are not type specific */
- ops.type = NTVFS_DISK;
+ ops.type = NTVFS_DISK;
ret = ntvfs_register(&ops, &vers);
if (!NT_STATUS_IS_OK(ret)) goto failed;
- ops.type = NTVFS_PRINT;
+ ops.type = NTVFS_PRINT;
ret = ntvfs_register(&ops, &vers);
if (!NT_STATUS_IS_OK(ret)) goto failed;
- ops.type = NTVFS_IPC;
+ ops.type = NTVFS_IPC;
ret = ntvfs_register(&ops, &vers);
if (!NT_STATUS_IS_OK(ret)) goto failed;
-
+
failed:
return ret;
}