* We got NT_STATUS_RETRY,
* we reset polling_msecs so that
* that the retries based on LOCK_NOT_GRANTED
- * will later start with small intervalls again.
+ * will later start with small intervals again.
*/
state->polling_msecs = 0;
/*
* We got LOCK_NOT_GRANTED, make sure
* a following STATUS_RETRY will start
- * with short intervalls again.
+ * with short intervals again.
*/
state->retry_msecs = 0;
/*
* This walks the list of fsps, we store the blocked reqs attached to
* them. It can be expensive, but this is legacy SMB1 and trying to
- * remember looking at traces I don't reall many of those calls.
+ * remember looking at traces I don't really see many of those calls.
*/
bool smbd_smb1_brl_finish_by_mid(
/*
* fsp->aio_requests and the contents (fsp->aio_requests[x])
* are both independently owned by fsp and are not in a
- * talloc heirarchy. This allows the fsp->aio_requests array to
+ * talloc hierarchy. This allows the fsp->aio_requests array to
* be reallocated independently of the array contents so it can
* grow on demand.
*
/****************************************************************************
Find first available connection slot, starting from a random position.
- The randomisation stops problems with the server dieing and clients
+ The randomisation stops problems with the server dying and clients
thinking the server is still available.
****************************************************************************/
Depending on the file system layout and file system features, the free space
information can be different for different sub directories underneath a SMB
share. Store the cache information in memcache using the query path as the
- key to accomodate this.
+ key to accommodate this.
****************************************************************************/
struct dfree_cached_info {
};
/*
- Initialise DMAPI session. The session is persistant kernel state,
+ Initialise DMAPI session. The session is persistent kernel state,
so it might already exist, in which case we merely want to
reconnect to it. This function should be called as root.
*/
This is default implementation of dmapi_file_flags() that is
called from VFS is_offline() call to know whether file is offline.
For GPFS-specific version see modules/vfs_tsmsm.c. It might be
- that approach on quering existence of a specific attribute that
+ that approach on querying existence of a specific attribute that
is used in vfs_tsmsm.c will work with other DMAPI-based HSM
implementations as well.
*/
return 0;
}
- /* AIX has DMAPI but no POSIX capablities support. In this case,
+ /* AIX has DMAPI but no POSIX capabilities support. In this case,
* we need to be root to do DMAPI manipulations.
*/
#ifndef HAVE_POSIX_CAPABILITIES
* MS-FSA 2.1.1.5 IsSparse
*
* This is a per stream attribute, but our backends don't
- * support it a consistent way, therefor just pretend
+ * support it a consistent way, therefore just pretend
* success and ignore the request.
*/
DBG_DEBUG("Ignoring request to set FILE_ATTRIBUTE_SPARSE on "
/*
Unix SMB/CIFS implementation.
- FAKE FILE suppport, for faking up special files windows want access to
+ FAKE FILE support, for faking up special files windows want access to
Copyright (C) Stefan (metze) Metzmacher 2003
This program is free software; you can redistribute it and/or modify
void fsp_set_fd(struct files_struct *fsp, int fd)
{
/*
- * Deliberatly allow setting an fd if the existing fd is the
+ * Deliberately allow setting an fd if the existing fd is the
* same. This happens if a VFS module assigns the fd to
* fsp->fh->fd in its openat VFS function. The canonical place
* where the assignment is done is in fd_open(), but some VFS
}
/*
- * No slash, dir is emtpy
+ * No slash, dir is empty
*/
dirname = talloc_strdup(mem_ctx, "");
if (dirname == NULL) {
*
* This gets incremented when new credits are
* granted and gets decremented when any credit
- * is comsumed.
+ * is consumed.
*
* Note: the decrementing is different compared
* to seq_range.
*
* Notes: The input name is *not* tested for 8.3 compliance. This must be
* done separately. This function returns true if the name contains
- * a magic character followed by excactly two characters from the
+ * a magic character followed by exactly two characters from the
* basechars list (above), which in turn are followed either by the
* nul (end of string) byte or a dot (extension) or by a '/' (end of
* a directory name).
for simplicity, we only allow ascii characters in 8.3 names
*/
- /* 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
*/
rights = SEC_DIR_LIST|SEC_DIR_TRAVERSE;
p = strrchr_m(filepath, '/');
/*
- * Check each path component, exluding the share root.
+ * Check each path component, excluding the share root.
*
* We could check all components including root using
* a do { .. } while() loop, but IMHO the logic is clearer
}
string_replace(tmp, '/', '\\');
- change->name = tmp;
+ change->name = tmp;
change->when = when;
change->action = action;
/*
* Database of everything clients show interest in. Indexed by
* absolute path. The database keys are not 0-terminated
- * to allow the criticial operation, notifyd_trigger, to walk
+ * to allow the critical operation, notifyd_trigger, to walk
* the structure from the top without adding intermediate 0s.
* The database records contain an array of
*
/*
Unix SMB/CIFS implementation.
- NT QUOTA suppport
+ NT QUOTA support
Copyright (C) Stefan (metze) Metzmacher 2003
This program is free software; you can redistribute it and/or modify
* Samba 3.6 and earlier granted execute access even
* if the ACL did not contain execute rights.
* Samba 4.0 is more correct and checks it.
- * The compatibilty mode allows one to skip this check
+ * The compatibility mode allows one to skip this check
* to smoothen upgrades.
*/
if (lp_acl_allow_execute_always(SNUM(fsp->conn))) {
/*
* Access to streams is checked by checking the basefile and
- * that has alreay been checked by check_base_file_access()
+ * that has already been checked by check_base_file_access()
* in create_file_unixpath().
*/
if (!fsp_is_alternate_stream(fsp)) {
watch_state->xconn = req->xconn;
watch_state->mid = req->mid;
- DBG_DEBUG("defering mid %" PRIu64 "\n", req->mid);
+ DBG_DEBUG("deferring mid %" PRIu64 "\n", req->mid);
watch_req = share_mode_watch_send(
watch_state,
* We need to fake up to open this MAGIC QUOTA file
* and return a valid FID.
*
- * w2k close this file directly after openening xp
+ * w2k close this file directly after opening xp
* also tries a QUERY_FILE_INFO on the file and then
* close it
*/
push to the end of the list. Note if the user was in no groups
this maps to a specific allow nothing entry for this user.
- The common case from the NT ACL choser (userX deny all) is
+ The common case from the NT ACL chooser (userX deny all) is
optimised so we don't do the group lookup - we just map to
an allow nothing entry.
If there is no group Everyone allow entry then convert the
group1 entry to a allow nothing entry and push to the end of the list.
- Note that the common case from the NT ACL choser (groupX deny all)
+ Note that the common case from the NT ACL chooser (groupX deny all)
cannot be optimised here as we need to modify user entries who are
in the group to change them to a deny all also.
group pass.
The above algorithm took a *lot* of thinking about - hence this
- explaination :-). JRA.
+ explanation :-). JRA.
****************************************************************************/
/****************************************************************************
/*
* This is one of the most system dependent parts of Samba, and its
- * done a litle differently. Each system has its own way of doing
+ * done a little differently. Each system has its own way of doing
* things :-(
*/
(*dfree) = (uint64_t)-1;
(*dsize) = (uint64_t)-1;
- /* As we have select not to use quotas, allways fail */
+ /* As we have select not to use quotas, always fail */
return false;
}
#endif /* WITH_QUOTAS */
/* Open the share_info.tdb here, so we don't have to open
after the fork on every single connection. This is a small
- performance improvment and reduces the total number of system
+ performance improvement and reduces the total number of system
fds used. */
status = share_info_db_init();
if (!NT_STATUS_IS_OK(status)) {
(unsigned int)state->setup_count));
/*
- * WinCE wierdness....
+ * WinCE weirdness....
*/
local_machine_name = talloc_asprintf(state, "\\%s\\",
i = n = 0;
#if 0
/*
- * This is the old error code we used. Aparently
+ * This is the old error code we used. Apparently
* WinNT/2k systems return ERRbuftoosmall (2123) and
* OS/2 needs this. I'm leaving this here so we can revert
* if needed. JRA.
DEBUG(3,("api_DosPrintQGetInfo uLevel=%d name=%s\n",uLevel,QueueName));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!prefix_ok(str1,"zWrLh"))
return False;
if (!check_printq_info(&desc,uLevel,str2,str3)) {
return False;
}
- p2 = (*rdata) + fixed_len; /* auxilliary data (strings) will go here */
+ p2 = (*rdata) + fixed_len; /* auxiliary data (strings) will go here */
p = *rdata;
f_len = fixed_len;
s_len = string_len;
return False;
}
- p2 = (*rdata) + fixed_len; /* auxilliary data (strings) will go here */
+ p2 = (*rdata) + fixed_len; /* auxiliary data (strings) will go here */
p = *rdata;
f_len = fixed_len;
s_len = string_len;
return False;
}
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!prefix_ok(str1,"zWrLh")) {
return False;
}
return False;
}
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!prefix_ok(str1,RAP_WShareAdd_REQ)) {
return False;
}
return False;
}
- /* check it's a supported varient */
+ /* check it's a supported variant */
if ( strcmp(str1,"zWrLeh") != 0 )
return False;
return False;
}
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp("B21",str2) != 0)
return False;
if(!rap_to_pjobid(SVAL(p,0), sharename, &jobid))
return False;
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!(strcsequal(str1,"W") && strcsequal(str2,"")))
return(False);
return False;
}
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!(strcsequal(str1,"z") && strcsequal(str2,"")))
return(False);
*rdata_len = 0;
- /* check it's a supported varient */
+ /* check it's a supported variant */
if ((strcmp(str1,"WWsTP")) ||
(!check_printjob_info(&desc,uLevel,str2)))
return(False);
DEBUG(4,("NetServerGetInfo level %d\n",uLevel));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!prefix_ok(str1,"WrLh")) {
return False;
}
return False;
}
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (!(level==10 && strcsequal(str1,"WrLh") && strcsequal(str2,"zzzBBzz"))) {
return False;
}
DEBUG(3,("WWkstaUserLogon uLevel=%d name=%s\n",uLevel,name));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"OOWb54WrLh") != 0) {
return False;
}
}
DEBUG(3,("WAccessGetUserPerms user=%s resource=%s\n",user,resource));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"zzh") != 0) {
return False;
}
DEBUG(3,("WPrintJobGetInfo uLevel=%d uJobId=0x%X\n",uLevel,SVAL(p,0)));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"WWrLh") != 0) {
return False;
}
DEBUG(3,("WPrintDestGetInfo uLevel=%d PrinterName=%s\n",uLevel,PrinterName));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"zWrLh") != 0) {
return False;
}
DEBUG(3,("WPrintDestEnum uLevel=%d\n",uLevel));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"WrLeh") != 0) {
return False;
}
DEBUG(3,("WPrintDriverEnum uLevel=%d\n",uLevel));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"WrLeh") != 0) {
return False;
}
DEBUG(3,("WPrintQProcEnum uLevel=%d\n",uLevel));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"WrLeh") != 0) {
return False;
}
DEBUG(3,("WPrintPortEnum uLevel=%d\n",uLevel));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,"WrLeh") != 0) {
return False;
}
DEBUG(7,("RNetSessionEnum req string=%s\n",str1));
DEBUG(7,("RNetSessionEnum ret string=%s\n",str2));
- /* check it's a supported varient */
+ /* check it's a supported variant */
if (strcmp(str1,RAP_NetSessionEnum_REQ) != 0) {
return False;
}
sign_flag = SMBXSRV_PROCESSED_SIGNED_PACKET;
} else if ((type == SMBecho) || (type == SMBsesssetupX)) {
/*
- * echo can be unsigned. Sesssion setup except final
+ * echo can be unsigned. Session setup except final
* session setup response too
*/
sign_flag &= ~SMBXSRV_PROCESSED_UNSIGNED_PACKET;
switch (lp_case_sensitive(snum)) {
case Auto:
/*
- * We need this uglyness due to DOS/Win9x clients that lie
+ * We need this ugliness due to DOS/Win9x clients that lie
* about case insensitivity. */
ra_type = get_remote_arch();
if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) {
return NT_STATUS_OK;
}
- /* Stip any leading '/' characters - MacOSX client behavior. */
+ /* Strip any leading '/' characters - MacOSX client behavior. */
while (*path == '/') {
path++;
}
p += 1; /* Allow for alignment */
switch (ioctl_code) {
- case IOCTL_QUERY_JOB_INFO:
+ case IOCTL_QUERY_JOB_INFO:
{
NTSTATUS status;
size_t len = 0;
double total_space, free_space;
/* we need to scale this to a number that DOS6 can handle. We
use floating point so we can handle large drives on systems
- that don't have 64 bit integers
+ that don't have 64 bit integers
we end up displaying a maximum of 2G to DOS systems
*/
ssize_t ret=0;
/*
- * We can only use sendfile on a non-chained packet
+ * We can only use sendfile on a non-chained packet
* but we can use on a non-oplocked file. tridge proved this
* on a train in Germany :-). JRA.
* reply_readbraw has already checked the length.
/*
* NB. Discovered by Menny Hamburger at Mainsoft. This is a core+
- * protocol request that predates the read/write lock concept.
+ * protocol request that predates the read/write lock concept.
* Thus instead of asking for a read lock here we need to ask
* for a write lock. JRA.
* Note that the requested lock size is unaffected by max_send.
reply_smb1_outbuf(req, 0, 0);
- /*
+ /*
* Patch from Ray Frush <frush@engr.colostate.edu>
* Sometimes times are sent as zero - ignore them.
*/
}
/* Logic to try and connect to the correct [homes] share, preferably
- without too many getpwnam() lookups. This is particulary nasty for
+ without too many getpwnam() lookups. This is particularly nasty for
winbind usernames, where the share name isn't the same as unix
username.
*/
state->op->status = NT_STATUS_OK;
state->op->global->disconnect_time = 0;
- /* save the timout for later update */
+ /* save the timeout for later update */
state->durable_timeout_msec = state->op->global->durable_timeout_msec;
state->update_open = true;
* We got NT_STATUS_RETRY,
* we reset polling_msecs so that
* that the retries based on LOCK_NOT_GRANTED
- * will later start with small intervalls again.
+ * will later start with small intervals again.
*/
state->polling_msecs = 0;
/*
* We got LOCK_NOT_GRANTED, make sure
* a following STATUS_RETRY will start
- * with short intervalls again.
+ * with short intervals again.
*/
state->retry_msecs = 0;
/* strangely enough, NT does not sent the single OID NTLMSSP when
not a ADS member, it sends no OIDs at all
- OLD COMMENT : "we can't do this until we teach our sesssion setup parser to know
+ OLD COMMENT : "we can't do this until we teach our session setup parser to know
about raw NTLMSSP (clients send no ASN.1 wrapping if we do this)"
Our sessionsetup code now handles raw NTLMSSP connects, so we can go
}
/****************************************************************************
- Write a securty descriptor into marshalled format.
+ Write a security descriptor into marshalled format.
****************************************************************************/
static NTSTATUS smbd_marshall_security_desc(TALLOC_CTX *mem_ctx,
offset += new_offset;
- /* check if new offset is outside buffer boundry. */
+ /* check if new offset is outside buffer boundary. */
if (offset >= sidlistlength) {
DBG_ERR("bufsize 0x%x exceeded by "
"new offset 0x%x)\n",
}
*d++ = *s++;
} else {
- size_t siz;
+ size_t ch_size;
/* Get the size of the next MB character. */
- next_codepoint(s,&siz);
- switch(siz) {
+ next_codepoint(s,&ch_size);
+ switch(ch_size) {
case 5:
*d++ = *s++;
FALL_THROUGH;
if (*path == '\0') {
return NT_STATUS_INVALID_PARAMETER;
}
- /* Stip any leading '\\' characters - MacOSX client behavior. */
+ /* Strip any leading '\\' characters - MacOSX client behavior. */
while (*path == '\\') {
path++;
}
}
}
- /* substract used credits */
+ /* subtract used credits */
xconn->smb2.credits.granted -= credit_charge;
return true;
* nonce wrap, or the security of the whole
* communication and the keys is destroyed.
* We must drop the connection once we have
- * transfered too much data.
+ * transferred too much data.
*
* NOTE: We assume nonces greater than 8 bytes.
*/
status = smbXsrv_pending_break_submit(pb);
if (NT_STATUS_EQUAL(status, NT_STATUS_ABANDONED)) {
/*
- * If there's no remaing connection
+ * If there's no remaining connection
* there's no need to send a break again.
*/
goto remove;
}
}
-/* USER Activites: */
+/* USER Activities: */
if (!change_to_user_and_service(conn, conn->vuid)) {
/* No point continuing if they fail the basic checks */
DBG_ERR("Can't become connected user!\n");
* not permission problems.
*/
change_to_root_user();
-/* ROOT Activites: */
+/* ROOT Activities: */
/*
* Canonicalise the connect
* nonce wrap, or the security of the whole
* communication and the keys is destroyed.
* We must drop the connection once we have
- * transfered too much data.
+ * transferred too much data.
*
* NOTE: We assume nonces greater than 8 bytes.
*/
/*
* It turns out that NT matches wildcards against
* both long *and* short names. This may explain some
- * of the wildcard wierdness from old DOS clients
+ * of the wildcard weirdness from old DOS clients
* that some people have been seeing.... JRA.
*/
/* Force the mangling into 8.3. */
* what we have to send --metze:
*
* Unknown1: 24 NULL bytes
- * Soft Quota Treshold: 8 bytes seems like uint64_t or so
+ * Soft Quota Threshold: 8 bytes seems like uint64_t or so
* Hard Quota Limit: 8 bytes seems like uint64_t or so
* Quota Flags: 2 byte :
* Unknown3: 6 NULL bytes
* We don't set a callback, as we just want to block the
* wait queue and the talloc_free() of the session will
* remove the item from the wait queue in order
- * to remove allow the connection to disapear.
+ * to remove allow the connection to disappear.
*/
if (xconn_wait_queue != NULL) {
subreq = tevent_queue_wait_send(session,
}
/*
- * This is garanteed to set
+ * This is guaranteed to set
* session->status = NT_STATUS_USER_SESSION_DELETED
* even if NULL is returned.
*/
* This means smb2_get_new_nonce() will return
* NT_STATUS_ENCRYPTION_FAILED.
*
- * But we intialize some random parts just in case...
+ * But we initialize some random parts just in case...
*/
session->nonce_high_max = session->nonce_high = 0;
generate_nonce_buffer((uint8_t *)&session->nonce_high_random,
struct cleanupdb_traverse_state {
TALLOC_CTX *mem_ctx;
bool ok;
- struct cleanup_child *childs;
+ struct cleanup_child *children;
};
static int cleanupdb_traverse_fn(const pid_t pid,
child->pid = pid;
child->unclean = unclean;
- DLIST_ADD(cleanup_state->childs, child);
+ DLIST_ADD(cleanup_state->children, child);
return 0;
}
};
/*
- * This merely collect childs in a list, whatever we're
+ * This merely collect children in a list, whatever we're
* supposed to cleanup for every child, it has to take place
* *after* the db traverse in a list loop. This is to minimize
- * locking interaction between the traverse and writers (ie
+ * locking interaction between the traverse and writers (i.e.
* the parent smbd).
*/
ret = cleanupdb_traverse_read(cleanupdb_traverse_fn, &cleanup_state);
return;
}
- for (child = cleanup_state.childs;
+ for (child = cleanup_state.children;
child != NULL;
child = child->next)
{