From: Andreas Schneider Date: Tue, 18 Jul 2023 09:30:18 +0000 (+0200) Subject: s3:smbd: Fix code spelling X-Git-Tag: ldb-2.8.0~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7077ae40423a4cbfa79b700c9b8f4da6d5d1612f;p=thirdparty%2Fsamba.git s3:smbd: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton --- diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index 10d657bb838..8b41288bfbf 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -476,7 +476,7 @@ static void smbd_smb1_do_locks_try(struct tevent_req *req) * 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; @@ -522,7 +522,7 @@ static void smbd_smb1_do_locks_try(struct tevent_req *req) /* * 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; @@ -751,7 +751,7 @@ static struct files_struct *smbd_smb1_brl_finish_by_mid_fn( /* * 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( diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 75089d41b47..2b180e0c718 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -762,7 +762,7 @@ static void assert_no_pending_aio(struct files_struct *fsp, /* * 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. * diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 776d7af4c12..27a4d27c695 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -72,7 +72,7 @@ bool conn_snum_used(struct smbd_server_connection *sconn, /**************************************************************************** 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. ****************************************************************************/ diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c index 236ca888150..89dc11293b5 100644 --- a/source3/smbd/dfree.c +++ b/source3/smbd/dfree.c @@ -180,7 +180,7 @@ dfree_done: 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 { diff --git a/source3/smbd/dmapi.c b/source3/smbd/dmapi.c index 6f6997cc8cb..1943fe9f20b 100644 --- a/source3/smbd/dmapi.c +++ b/source3/smbd/dmapi.c @@ -54,7 +54,7 @@ struct smbd_dmapi_context { }; /* - 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. */ @@ -255,7 +255,7 @@ bool dmapi_destroy_session(void) 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. */ @@ -284,7 +284,7 @@ uint32_t dmapi_file_flags(const char * const path) 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 diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index b8d00209c1e..18d2322cf0e 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -1097,7 +1097,7 @@ NTSTATUS file_set_sparse(connection_struct *conn, * 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 " diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c index 90336b29ccf..06b0178801e 100644 --- a/source3/smbd/fake_file.c +++ b/source3/smbd/fake_file.c @@ -1,6 +1,6 @@ /* 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 diff --git a/source3/smbd/fd_handle.c b/source3/smbd/fd_handle.c index 87472909787..eb7fa55e22a 100644 --- a/source3/smbd/fd_handle.c +++ b/source3/smbd/fd_handle.c @@ -131,7 +131,7 @@ int fsp_get_pathref_fd(const struct files_struct *fsp) 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 diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 7f97daef1fd..9bd3ee77547 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -642,7 +642,7 @@ static bool filename_split_lcomp( } /* - * No slash, dir is emtpy + * No slash, dir is empty */ dirname = talloc_strdup(mem_ctx, ""); if (dirname == NULL) { diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index ed79ba657ac..69023fcc50a 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -495,7 +495,7 @@ struct smbXsrv_connection { * * 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. diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index d5035f97d4e..6a3cb33a5de 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -740,7 +740,7 @@ static void init_chartest( void ) * * 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). diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index a8cf3527b57..9c80cde312f 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -30,7 +30,7 @@ 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 */ diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 87f08124171..399d7800249 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -644,7 +644,7 @@ static bool user_can_stat_name_under_fsp(files_struct *fsp, const char *name) 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 @@ -823,7 +823,7 @@ static void notify_fsp(files_struct *fsp, struct timespec when, } string_replace(tmp, '/', '\\'); - change->name = tmp; + change->name = tmp; change->when = when; change->action = action; diff --git a/source3/smbd/notifyd/notifyd.c b/source3/smbd/notifyd/notifyd.c index 475c8e9f508..ca303bd4d51 100644 --- a/source3/smbd/notifyd/notifyd.c +++ b/source3/smbd/notifyd/notifyd.c @@ -58,7 +58,7 @@ struct notifyd_state { /* * 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 * diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c index 43714e099fd..590e26f7fed 100644 --- a/source3/smbd/ntquotas.c +++ b/source3/smbd/ntquotas.c @@ -1,6 +1,6 @@ /* 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 diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 94f50becb24..87719eec06e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -292,7 +292,7 @@ NTSTATUS smbd_check_access_rights_fsp(struct files_struct *dirfsp, * 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))) { @@ -1626,7 +1626,7 @@ static NTSTATUS open_file(struct smb_request *req, /* * 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)) { @@ -2978,7 +2978,7 @@ static void defer_open(struct share_mode_lock *lck, 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, @@ -6545,7 +6545,7 @@ NTSTATUS create_file_default(connection_struct *conn, * 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 */ diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 78739602854..6fc6e667f1e 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -2108,7 +2108,7 @@ static bool create_canon_ace_lists(files_struct *fsp, 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. @@ -2137,7 +2137,7 @@ static bool create_canon_ace_lists(files_struct *fsp, 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. @@ -2163,7 +2163,7 @@ static bool create_canon_ace_lists(files_struct *fsp, group pass. The above algorithm took a *lot* of thinking about - hence this - explaination :-). JRA. + explanation :-). JRA. ****************************************************************************/ /**************************************************************************** diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index ee426115dfb..40fb3ee3c07 100644 --- a/source3/smbd/quotas.c +++ b/source3/smbd/quotas.c @@ -20,7 +20,7 @@ /* * 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 :-( */ @@ -349,7 +349,7 @@ bool disk_quotas(connection_struct *conn, struct smb_filename *fname, (*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 */ diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 6bdaca7a0a4..18c79f9df35 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1999,7 +1999,7 @@ extern void build_options(bool screen); /* 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)) { diff --git a/source3/smbd/smb1_ipc.c b/source3/smbd/smb1_ipc.c index ec25a540a70..3f9958fece0 100644 --- a/source3/smbd/smb1_ipc.c +++ b/source3/smbd/smb1_ipc.c @@ -588,7 +588,7 @@ static void handle_trans(connection_struct *conn, struct smb_request *req, (unsigned int)state->setup_count)); /* - * WinCE wierdness.... + * WinCE weirdness.... */ local_machine_name = talloc_asprintf(state, "\\%s\\", diff --git a/source3/smbd/smb1_lanman.c b/source3/smbd/smb1_lanman.c index 65711078c89..6cdf48a120c 100644 --- a/source3/smbd/smb1_lanman.c +++ b/source3/smbd/smb1_lanman.c @@ -345,7 +345,7 @@ static bool init_package(struct pack_desc *p, int count, int subcount) 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. @@ -866,7 +866,7 @@ static bool api_DosPrintQGetInfo(struct smbd_server_connection *sconn, 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)) { @@ -1618,7 +1618,7 @@ static bool api_RNetServerEnum2(struct smbd_server_connection *sconn, 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; @@ -1823,7 +1823,7 @@ static bool api_RNetServerEnum3(struct smbd_server_connection *sconn, 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; @@ -2088,7 +2088,7 @@ static bool api_RNetShareGetInfo(struct smbd_server_connection *sconn, return False; } - /* check it's a supported varient */ + /* check it's a supported variant */ if (!prefix_ok(str1,"zWrLh")) { return False; } @@ -2271,7 +2271,7 @@ static bool api_RNetShareAdd(struct smbd_server_connection *sconn, return False; } - /* check it's a supported varient */ + /* check it's a supported variant */ if (!prefix_ok(str1,RAP_WShareAdd_REQ)) { return False; } @@ -2622,7 +2622,7 @@ static bool api_NetUserGetGroups(struct smbd_server_connection *sconn, return False; } - /* check it's a supported varient */ + /* check it's a supported variant */ if ( strcmp(str1,"zWrLeh") != 0 ) return False; @@ -2837,7 +2837,7 @@ static bool api_RNetUserEnum(struct smbd_server_connection *sconn, return False; } - /* check it's a supported varient */ + /* check it's a supported variant */ if (strcmp("B21",str2) != 0) return False; @@ -3198,7 +3198,7 @@ static bool api_RDosPrintJobDel(struct smbd_server_connection *sconn, 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); @@ -3323,7 +3323,7 @@ static bool api_WPrintQueueCtrl(struct smbd_server_connection *sconn, return False; } - /* check it's a supported varient */ + /* check it's a supported variant */ if (!(strcsequal(str1,"z") && strcsequal(str2,""))) return(False); @@ -3506,7 +3506,7 @@ static bool api_PrintJobInfo(struct smbd_server_connection *sconn, *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); @@ -3647,7 +3647,7 @@ static bool api_RNetServerGetInfo(struct smbd_server_connection *sconn, 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; } @@ -3823,7 +3823,7 @@ static bool api_NetWkstaGetInfo(struct smbd_server_connection *sconn, 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; } @@ -4502,7 +4502,7 @@ static bool api_WWkstaUserLogon(struct smbd_server_connection *sconn, 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; } @@ -4595,7 +4595,7 @@ static bool api_WAccessGetUserPerms(struct smbd_server_connection *sconn, } 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; } @@ -4656,7 +4656,7 @@ static bool api_WPrintJobGetInfo(struct smbd_server_connection *sconn, 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; } @@ -5004,7 +5004,7 @@ static bool api_WPrintDestGetInfo(struct smbd_server_connection *sconn, 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; } @@ -5137,7 +5137,7 @@ static bool api_WPrintDestEnum(struct smbd_server_connection *sconn, 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; } @@ -5241,7 +5241,7 @@ static bool api_WPrintDriverEnum(struct smbd_server_connection *sconn, 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; } @@ -5304,7 +5304,7 @@ static bool api_WPrintQProcEnum(struct smbd_server_connection *sconn, 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; } @@ -5369,7 +5369,7 @@ static bool api_WPrintPortEnum(struct smbd_server_connection *sconn, 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; } @@ -5451,7 +5451,7 @@ static bool api_RNetSessionEnum(struct smbd_server_connection *sconn, 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; } diff --git a/source3/smbd/smb1_process.c b/source3/smbd/smb1_process.c index dd1ff7d4766..b775a3691f3 100644 --- a/source3/smbd/smb1_process.c +++ b/source3/smbd/smb1_process.c @@ -986,7 +986,7 @@ static void smb1srv_update_crypto_flags(struct smbXsrv_session *session, 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; @@ -1029,7 +1029,7 @@ static void set_current_case_sensitive(connection_struct *conn, uint16_t flags) 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)) { diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c index a0d84bcbffc..529987b8cd6 100644 --- a/source3/smbd/smb1_reply.c +++ b/source3/smbd/smb1_reply.c @@ -88,7 +88,7 @@ NTSTATUS smb1_strip_dfs_path(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } - /* Stip any leading '/' characters - MacOSX client behavior. */ + /* Strip any leading '/' characters - MacOSX client behavior. */ while (*path == '/') { path++; } @@ -602,7 +602,7 @@ void reply_ioctl(struct smb_request *req) p += 1; /* Allow for alignment */ switch (ioctl_code) { - case IOCTL_QUERY_JOB_INFO: + case IOCTL_QUERY_JOB_INFO: { NTSTATUS status; size_t len = 0; @@ -1055,7 +1055,7 @@ void reply_dskattr(struct smb_request *req) 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 */ @@ -2864,7 +2864,7 @@ static void send_file_readbraw(connection_struct *conn, 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. @@ -3175,7 +3175,7 @@ void reply_lockread(struct smb_request *req) /* * 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. @@ -6943,7 +6943,7 @@ void reply_setattrE(struct smb_request *req) reply_smb1_outbuf(req, 0, 0); - /* + /* * Patch from Ray Frush * Sometimes times are sent as zero - ignore them. */ diff --git a/source3/smbd/smb1_service.c b/source3/smbd/smb1_service.c index df26b9fa9d8..99541010c40 100644 --- a/source3/smbd/smb1_service.c +++ b/source3/smbd/smb1_service.c @@ -161,7 +161,7 @@ connection_struct *make_connection(struct smb_request *req, } /* 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. */ diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 86524f1522a..5f5ccd52519 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -1024,7 +1024,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, 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; diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c index 642e9c74151..c9d810f71ba 100644 --- a/source3/smbd/smb2_lock.c +++ b/source3/smbd/smb2_lock.c @@ -604,7 +604,7 @@ static void smbd_smb2_lock_try(struct tevent_req *req) * 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; @@ -665,7 +665,7 @@ static void smbd_smb2_lock_try(struct tevent_req *req) /* * 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; diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index 5ac004bb276..9d4ce160e5c 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -995,7 +995,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbXsrv_connection *xconn) /* 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 diff --git a/source3/smbd/smb2_nttrans.c b/source3/smbd/smb2_nttrans.c index 84defa3f052..1312d9bfc36 100644 --- a/source3/smbd/smb2_nttrans.c +++ b/source3/smbd/smb2_nttrans.c @@ -494,7 +494,7 @@ static NTSTATUS smbd_fetch_security_desc(connection_struct *conn, } /**************************************************************************** - Write a securty descriptor into marshalled format. + Write a security descriptor into marshalled format. ****************************************************************************/ static NTSTATUS smbd_marshall_security_desc(TALLOC_CTX *mem_ctx, @@ -719,7 +719,7 @@ static enum ndr_err_code extract_sids_from_buf(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", diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c index 36a863c687b..9113878fa8c 100644 --- a/source3/smbd/smb2_reply.c +++ b/source3/smbd/smb2_reply.c @@ -188,10 +188,10 @@ NTSTATUS check_path_syntax(char *path, bool posix_path) } *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; @@ -233,7 +233,7 @@ NTSTATUS smb2_strip_dfs_path(const char *in_path, const char **out_path) 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++; } diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 14842b0a6ef..5a595313cd0 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -867,7 +867,7 @@ static bool smb2_validate_message_id(struct smbXsrv_connection *xconn, } } - /* substract used credits */ + /* subtract used credits */ xconn->smb2.credits.granted -= credit_charge; return true; @@ -2246,7 +2246,7 @@ static NTSTATUS smb2_get_new_nonce(struct smbXsrv_session *session, * 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. */ @@ -4385,7 +4385,7 @@ static void smbXsrv_pending_break_done(struct tevent_req *subreq) 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; diff --git a/source3/smbd/smb2_service.c b/source3/smbd/smb2_service.c index bfcf1c5106e..856974c4077 100644 --- a/source3/smbd/smb2_service.c +++ b/source3/smbd/smb2_service.c @@ -683,7 +683,7 @@ NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, } } -/* 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"); @@ -732,7 +732,7 @@ NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, * not permission problems. */ change_to_root_user(); -/* ROOT Activites: */ +/* ROOT Activities: */ /* * Canonicalise the connect diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index cd97f775eb5..e15a83d765a 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -334,7 +334,7 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session, * 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. */ diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 85233a055a6..3eb4a2de879 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -981,7 +981,7 @@ static bool smbd_dirptr_lanman2_match_fn(TALLOC_CTX *ctx, /* * 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. */ @@ -2318,7 +2318,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned * 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 diff --git a/source3/smbd/smbXsrv_session.c b/source3/smbd/smbXsrv_session.c index e19c0188e7a..2c0e3996695 100644 --- a/source3/smbd/smbXsrv_session.c +++ b/source3/smbd/smbXsrv_session.c @@ -1662,7 +1662,7 @@ NTSTATUS smbXsrv_session_remove_channel(struct smbXsrv_session *session, * 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, @@ -1678,7 +1678,7 @@ NTSTATUS smbXsrv_session_remove_channel(struct smbXsrv_session *session, } /* - * This is garanteed to set + * This is guaranteed to set * session->status = NT_STATUS_USER_SESSION_DELETED * even if NULL is returned. */ @@ -2341,7 +2341,7 @@ NTSTATUS smb2srv_session_lookup_global(struct smbXsrv_client *client, * 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, diff --git a/source3/smbd/smbd_cleanupd.c b/source3/smbd/smbd_cleanupd.c index 86c0212e1cc..0a50b183311 100644 --- a/source3/smbd/smbd_cleanupd.c +++ b/source3/smbd/smbd_cleanupd.c @@ -89,7 +89,7 @@ struct cleanup_child { 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, @@ -108,7 +108,7 @@ 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; } @@ -132,10 +132,10 @@ static void smbd_cleanupd_process_exited(struct messaging_context *msg, }; /* - * 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); @@ -150,7 +150,7 @@ static void smbd_cleanupd_process_exited(struct messaging_context *msg, return; } - for (child = cleanup_state.childs; + for (child = cleanup_state.children; child != NULL; child = child->next) {