The branch, master has been updated via 61d97ebf7d4 gitlab-ci: Add running codespell via e54939c8453 scripts: Add codespell check via 45e17b70004 wintest: Fix code spelling via be56ec0a6b9 tests: Fix code spelling via a7ed7405af9 testprogs: Fix code spelling via 5f024d57b31 s4:wrepl_server: Fix code spelling via dbfc239f5b5 s4:wrepl_server: Remove trailing white spaces via 920ffe5dc9a s4:torture: Fix code spelling via 0d241305b4e s4:torture:smb2: Fix code spelling via 085cfe0c4a3 s4:torture:rpc: Fix code spelling via ff2f813b68c s4:torture:raw: Fix code spelling via 428c1556460 s4:torture:nbt: Fix code spelling via c4ed99a2231 s4:torture:nbench: Fix code spelling via 664f69617df s4:torture:libnetapi: Fix code spelling via faa06e5ed21 s4:torture:ldb: Fix code spelling via 1c4e84fd2a0 s4:torture:ldap: Fix code spelling via 3f023d74143 s4:torture:ldap: Remove trailing white spaces via 56fdc3c5882 s4:torture:krb5: Fix code spelling via e2c952cfea0 s4:torture:dns: Fix code spelling via 5850ea63386 s4:torture:basic: Fix code spelling via 69b7876965a s4:torture:drs: Fix code spelling via 3dd7625ab97 s4:torture:dfs: Fix code spelling via 5dd07a44a24 s4:torture:auth: Fix code spelling via e1da1fc9d97 s4:smb_server: Fix code spelling via 5a0201e8b48 s4:setup: Fix code spelling via 541f4d08a36 s3:ldap_server: Fix code spelling via 9ebd645e63f s4:selftest: Fix code spelling via 9c13765f2d9 s4:scripting: Fix code spelling via ee1bc66e025 s4:samba: Fix code spelling via 8d85b9987ee s4:rpc_server: Fix code spelling via 6427dafe702 s4:ntvfs: Fix code spelling via 42f094afde1 s4:librpc: Fix code spelling via 37664f4ce7d s4:libnet: Fix code spelling via 950f0b47d94 s4:libcli: Fix code spelling via a749d885f3a s4:libcli: Remove tailing white spaces via 783eff3f76d s4:lib: Fix code spelling from 42e4691cf55 audit_logging: Simplify json_add_stringn() with json_stringn()
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 61d97ebf7d4c46b1a0946634b6e3fe69f44dd01c Author: Andreas Schneider <a...@samba.org> Date: Wed Mar 22 10:15:54 2023 +0100 gitlab-ci: Add running codespell Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Mon Aug 14 22:44:58 UTC 2023 on atb-devel-224 commit e54939c8453c518ec121f02912d95c9143e6bd3f Author: Andreas Schneider <a...@samba.org> Date: Tue Mar 14 08:51:03 2023 +0100 scripts: Add codespell check Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 45e17b700049f6672149b14216a30818df2bd4b7 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:50:30 2023 +0200 wintest: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit be56ec0a6b9b8ed07416c3f1f2805f4c6622b9da Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:50:07 2023 +0200 tests: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit a7ed7405af938e757d895464028345a1b669ccfb Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:49:45 2023 +0200 testprogs: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 5f024d57b313d608660aac240500796dd2dc7eb0 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:48:16 2023 +0200 s4:wrepl_server: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit dbfc239f5b51e9142d96d3d2e34ba10b630385b0 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:49:06 2023 +0200 s4:wrepl_server: Remove trailing white spaces Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 920ffe5dc9a2a12f9bacd9c7eb2ce629207c4863 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:46:43 2023 +0200 s4:torture: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 0d241305b4e445a543375a93f0f5485a1ad0ae34 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:45:39 2023 +0200 s4:torture:smb2: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 085cfe0c4a3b9ec8a9d37d7f29ad6ae4950e63ee Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:45:20 2023 +0200 s4:torture:rpc: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit ff2f813b68ca3db3b73df5d62c9181b844d05c17 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:45:05 2023 +0200 s4:torture:raw: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 428c15564600dc45da2649e74497f7421b5849b0 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:44:41 2023 +0200 s4:torture:nbt: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit c4ed99a223107c1905694095eb38a6238891c16c Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:44:26 2023 +0200 s4:torture:nbench: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 664f69617df58edc7f5d1e540289d79b88ba81ea Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:44:01 2023 +0200 s4:torture:libnetapi: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit faa06e5ed21c8eca6b063154646474d188f61fa8 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:43:39 2023 +0200 s4:torture:ldb: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 1c4e84fd2a01bf4868062fca0f5f2384eaafcdc0 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:43:00 2023 +0200 s4:torture:ldap: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 3f023d74143a1324e96f235b6a5bb60bd1548c85 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:59:51 2023 +0200 s4:torture:ldap: Remove trailing white spaces Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 56fdc3c58824d83200ac0d7acbdf28ef44ae9eda Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:42:18 2023 +0200 s4:torture:krb5: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit e2c952cfea0053a4dc22587c0569fe11ce7234c9 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:41:49 2023 +0200 s4:torture:dns: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 5850ea6338657e029c4c080b8ebb6e09f8356377 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:41:02 2023 +0200 s4:torture:basic: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 69b7876965a10b376e04cf0b2e48bc8a1fad4382 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:40:42 2023 +0200 s4:torture:drs: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 3dd7625ab976f5ede1e41f78a22437328d6d5e79 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:40:20 2023 +0200 s4:torture:dfs: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 5dd07a44a24631525b4c883294e7db2646e3ebeb Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:39:59 2023 +0200 s4:torture:auth: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit e1da1fc9d97ff7581dce5f214cf2bb664bda9b27 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:35:35 2023 +0200 s4:smb_server: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 5a0201e8b482245748a9bd3af67777dd1bdb0a20 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:34:24 2023 +0200 s4:setup: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 541f4d08a3642673a51c1f2274dd3e4e284f8708 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:29:56 2023 +0200 s3:ldap_server: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 9ebd645e63f4eb7015a69a160a287c1e61950b7c Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 15:28:06 2023 +0200 s4:selftest: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 9c13765f2d9583ca3917e024d3a8efec590077e3 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:45:16 2023 +0200 s4:scripting: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit ee1bc66e025c5bbbb38f4b953ce114d90c1f452b Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:42:10 2023 +0200 s4:samba: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 8d85b9987eeb3bee54d4e51da98fd76f487dce93 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:40:26 2023 +0200 s4:rpc_server: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 6427dafe702609391beb545df3349172e656d7a4 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:40:03 2023 +0200 s4:ntvfs: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 42f094afde12f7c338283306b91901592c0140da Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:37:09 2023 +0200 s4:librpc: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 37664f4ce7d8f0f18e797f6e537a7bc3db88017e Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:36:50 2023 +0200 s4:libnet: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 950f0b47d94c572c0dc62cd256b8bf02f0fdc299 Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:34:51 2023 +0200 s4:libcli: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit a749d885f3ae3b6349f19bd3bef4f3c85fc4a3f2 Author: Andreas Schneider <a...@samba.org> Date: Fri Aug 4 07:21:18 2023 +0200 s4:libcli: Remove tailing white spaces Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 783eff3f76d0df30d99a3c197e2610f97d255bce Author: Andreas Schneider <a...@samba.org> Date: Thu Aug 3 14:32:27 2023 +0200 s4:lib: Fix code spelling Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: .codespellignore | 49 ++++++++++++++ .codespellrc | 4 ++ .gitlab-ci-main.yml | 6 +- script/autobuild.py | 3 +- script/codespell.sh | 21 ++++++ source4/ldap_server/ldap_backend.c | 2 +- source4/lib/registry/tests/diff.c | 2 +- source4/lib/socket/socket.c | 4 +- source4/lib/socket/socket.h | 2 +- source4/lib/stream/packet.c | 2 +- source4/libcli/ldap/ldap_bind.c | 2 +- source4/libcli/ldap/ldap_client.c | 2 +- source4/libcli/raw/interfaces.h | 10 +-- source4/libcli/raw/libcliraw.h | 4 +- source4/libcli/raw/rawfileinfo.c | 4 +- source4/libcli/raw/smb.h | 2 +- source4/libcli/resolve/dns_ex.c | 2 +- source4/libcli/smb2/find.c | 4 +- source4/libcli/smb2/request.c | 2 +- source4/libcli/smb2/smb2.h | 2 +- source4/libcli/smb_composite/fsinfo.c | 2 +- source4/libcli/smb_composite/sesssetup.c | 78 +++++++++++----------- source4/libcli/smb_composite/smb_composite.h | 2 +- source4/libnet/libnet_domain.c | 2 +- source4/libnet/libnet_group.c | 2 +- source4/libnet/libnet_rpc.h | 2 +- source4/librpc/idl/winsif.idl | 2 +- source4/librpc/rpc/dcerpc.h | 2 +- source4/librpc/rpc/dcerpc_schannel.c | 4 +- source4/ntvfs/cifs/README | 2 +- source4/ntvfs/common/brlock_tdb.c | 6 +- source4/ntvfs/ipc/vfs_ipc.c | 2 +- source4/ntvfs/ntvfs.h | 2 +- source4/ntvfs/posix/pvfs_resolve.c | 4 +- source4/ntvfs/posix/pvfs_streams.c | 6 +- source4/ntvfs/posix/pvfs_unlink.c | 2 +- source4/ntvfs/posix/pvfs_util.c | 2 +- source4/ntvfs/posix/vfs_posix.c | 4 +- source4/ntvfs/simple/vfs_simple.c | 2 +- source4/ntvfs/sysdep/README | 2 +- source4/ntvfs/sysdep/inotify.c | 4 +- source4/ntvfs/sysdep/sys_lease_linux.c | 2 +- source4/ntvfs/unixuid/vfs_unixuid.c | 40 +++++------ source4/rpc_server/backupkey/dcesrv_backupkey.c | 2 +- source4/rpc_server/common/server_info.c | 2 +- source4/rpc_server/dnsserver/dnsdata.c | 2 +- source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 2 +- source4/rpc_server/drsuapi/getncchanges.c | 6 +- source4/rpc_server/lsa/dcesrv_lsa.c | 8 +-- source4/rpc_server/lsa/lsa_lookup.c | 4 +- source4/rpc_server/netlogon/dcerpc_netlogon.c | 10 +-- source4/rpc_server/samr/dcesrv_samr.c | 2 +- source4/rpc_server/srvsvc/srvsvc_ntvfs.c | 4 +- source4/rpc_server/wkssvc/dcesrv_wkssvc.c | 2 +- source4/samba/server.c | 2 +- source4/scripting/bin/samba_upgradeprovision | 30 ++++----- source4/scripting/devel/demodirsync.py | 2 +- source4/selftest/tests.py | 4 +- source4/setup/named.txt | 2 +- source4/smb_server/smb/negprot.c | 2 +- source4/smb_server/smb_server.h | 4 +- source4/torture/auth/pac.c | 2 +- source4/torture/basic/delaywrite.c | 8 +-- source4/torture/basic/delete.c | 2 +- source4/torture/basic/denytest.c | 6 +- source4/torture/basic/misc.c | 4 +- source4/torture/dfs/domaindfs.c | 2 +- source4/torture/dns/dlz_bind9.c | 8 +-- source4/torture/drs/python/fsmo.py | 8 +-- source4/torture/drs/python/link_conflicts.py | 8 +-- source4/torture/drs/python/repl_move.py | 10 +-- source4/torture/drs/python/repl_rodc.py | 2 +- source4/torture/drs/python/repl_schema.py | 2 +- source4/torture/drs/python/repl_secdesc.py | 2 +- source4/torture/drs/python/replica_sync.py | 2 +- source4/torture/drs/python/ridalloc_exop.py | 6 +- source4/torture/krb5/kdc-canon-heimdal.c | 8 +-- source4/torture/krb5/kdc-heimdal.c | 4 +- source4/torture/ldap/ldap_sort.c | 26 ++++---- source4/torture/ldb/ldb.c | 16 ++--- source4/torture/libnetapi/libnetapi.c | 2 +- source4/torture/libnetapi/libnetapi_group.c | 2 +- source4/torture/nbench/nbench.c | 34 +++++----- source4/torture/nbt/winsreplication.c | 4 +- source4/torture/raw/context.c | 2 +- source4/torture/raw/lock.c | 4 +- source4/torture/raw/offline.c | 62 ++++++++--------- source4/torture/raw/oplock.c | 8 +-- source4/torture/raw/samba3misc.c | 2 +- source4/torture/raw/streams.c | 2 +- source4/torture/raw/write.c | 2 +- source4/torture/rpc/alter_context.c | 2 +- source4/torture/rpc/backupkey.c | 10 +-- source4/torture/rpc/drsuapi.c | 2 +- source4/torture/rpc/iremotewinspool_driver.c | 2 +- source4/torture/rpc/lsa.c | 2 +- source4/torture/rpc/mdssvc.c | 2 +- source4/torture/rpc/netlogon.c | 2 +- source4/torture/rpc/remote_pac.c | 4 +- source4/torture/rpc/samba3rpc.c | 2 +- source4/torture/rpc/samlogon.c | 4 +- source4/torture/rpc/samr.c | 4 +- source4/torture/rpc/samr_accessmask.c | 8 +-- source4/torture/rpc/schannel.c | 8 +-- source4/torture/rpc/testjoin.c | 2 +- source4/torture/smb2/acls.c | 6 +- source4/torture/smb2/compound.c | 4 +- source4/torture/smb2/create.c | 42 ++++++------ source4/torture/smb2/dir.c | 2 +- source4/torture/smb2/ea.c | 2 +- source4/torture/smb2/ioctl.c | 4 +- source4/torture/smb2/lease.c | 2 +- source4/torture/smb2/oplock.c | 8 +-- source4/torture/smb2/replay.c | 6 +- source4/torture/smb2/samba3misc.c | 2 +- source4/torture/smb2/timestamps.c | 2 +- source4/torture/smbtorture.c | 2 +- source4/torture/util_smb.c | 2 +- source4/torture/winbind/struct_based.c | 2 +- source4/wrepl_server/wrepl_server.c | 2 +- source4/wrepl_server/wrepl_server.h | 42 ++++++------ testprogs/blackbox/test_kinit.sh | 4 +- testprogs/blackbox/test_net_ads.sh | 2 +- .../blackbox/test_weak_disable_ntlmssp_ldap.sh | 2 +- testprogs/win32/spoolss/README.win32 | 2 +- tests/fcntl_lock.c | 2 +- tests/sysquotas.c | 2 +- wintest/test-s4-howto.py | 8 +-- wintest/wintest.py | 2 +- 129 files changed, 464 insertions(+), 389 deletions(-) create mode 100644 .codespellignore create mode 100644 .codespellrc create mode 100755 script/codespell.sh Changeset truncated at 500 lines: diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 00000000000..ee56c0af3ec --- /dev/null +++ b/.codespellignore @@ -0,0 +1,49 @@ +aas +afile +ags +ans +blong +browseable +bu +clen +daa +ect +fo +hampster +htmp +ifset +inout +ist +keypair +mis +nd +ois +ommit +ot +otherwrite +parm +parm +parms +pevent +plese +pres +rcall +readd +ro +siz +slq +sorce +som +stap +strin +thur +te +tung +ue +unsecure +unx +uptodateness +ypes +som +vas +wronly diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000000..de4f0fbbbae --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = ./bin,./docs-xml/archives,./docs-xml/manpages/vfs_fruit.8.xml,./docs-xml/smbdotconf/browse/preferredmaster.xml,./lib/ldb/ldb_sqlite3/trees.ps,./libcli/util/ntstatus.h,./libcli/util/hresult.c,./python/samba/tests/blackbox/testdata,./source3/include/MacExtensions.h,./source3/selftest/ktest-krb5_ccache-2.txt,./source4/setup/display-specifiers,./source4/ldap_server/devdocs,./source4/selftest/provisions,./source4/setup/adprep/WindowsServerDocs,./source4/setup/display-specifiers,./source4/torture/vfs/fruit.c,./testdata,./third_party,*.IBM-DS,*.config,*.diff,*.dump,*.ldif,*.ldf,*.pdml,*.pem,*.po,*.schema +ignore-regex = \\[t] +ignore-words = .codespellignore diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index 51327e7dee8..729de8654bb 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -257,7 +257,7 @@ samba-def-build: needs: - job: samba-def-build artifacts: true - - job: samba-shellcheck + - job: samba-codecheck samba-mit-build: extends: .shared_template_build_only @@ -272,7 +272,7 @@ samba-mit-build: needs: - job: samba-mit-build artifacts: true - - job: samba-shellcheck + - job: samba-codecheck samba-h5l-build: extends: .shared_template_build_only @@ -388,7 +388,7 @@ samba-fips: variables: SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38} -samba-shellcheck: +samba-codecheck: extends: .shared_template needs: variables: diff --git a/script/autobuild.py b/script/autobuild.py index e074c39d3c0..e230c80761e 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -1042,9 +1042,10 @@ tasks = { ], }, - "samba-shellcheck": { + "samba-codecheck": { "sequence": [ ("run", "script/check-shell-scripts.sh ."), + ("run", "script/codespell.sh ."), ], }, diff --git a/script/codespell.sh b/script/codespell.sh new file mode 100755 index 00000000000..60e0eba2737 --- /dev/null +++ b/script/codespell.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Check code spelling + +if [ $# -lt 1 ]; then + echo "Usage: $(basename "${0}") DIR" + exit 1 +fi + +DIR="${1}" + +codespell "${DIR}" +ret=$? + +if [ ${ret} -ne 0 ]; then + echo + echo "Fix code spelling issues. If it detected false positives" \ + "please update .codespellignore." +fi + +exit ${ret} diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c index a165ecbf36c..4e94417c21b 100644 --- a/source4/ldap_server/ldap_backend.c +++ b/source4/ldap_server/ldap_backend.c @@ -594,7 +594,7 @@ struct ldapsrv_context { int extended_type; bool attributesonly; struct ldb_control **controls; - size_t count; /* For notificaiton only */ + size_t count; /* For notification only */ }; static int ldap_server_search_callback(struct ldb_request *req, struct ldb_reply *ares) diff --git a/source4/lib/registry/tests/diff.c b/source4/lib/registry/tests/diff.c index 5d2bfd7002c..35f968a0a84 100644 --- a/source4/lib/registry/tests/diff.c +++ b/source4/lib/registry/tests/diff.c @@ -213,7 +213,7 @@ static bool diff_setup_tcase(struct torture_context *tctx, void **data) error = r2_ctx->ops->get_predefined_key(r2_ctx, HKEY_LOCAL_MACHINE, &key); torture_assert_werr_ok(tctx, error, "Opening HKEY_LOCAL_MACHINE failed"); error = r2_ctx->ops->create_key(r2_ctx, key, "Software", NULL, NULL, &newkey); - torture_assert_werr_ok(tctx, error, "Creating HKLM\\Sofware failed"); + torture_assert_werr_ok(tctx, error, "Creating HKLM\\Software failed"); error = r2_ctx->ops->create_key(r2_ctx, newkey, "Microsoft", NULL, NULL, &newkey); torture_assert_werr_ok(tctx, error, "Creating HKLM\\Software\\Microsoft failed"); error = r2_ctx->ops->create_key(r2_ctx, newkey, "Windows", NULL, NULL, &newkey); diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c index 26f23f56653..ef54029a31e 100644 --- a/source4/lib/socket/socket.c +++ b/source4/lib/socket/socket.c @@ -253,7 +253,7 @@ _PUBLIC_ NTSTATUS socket_send(struct socket_context *sock, return STATUS_MORE_ENTRIES; } /* The random size sends are incompatible with TLS and SASL - * sockets, which require re-sends to be consistant */ + * sockets, which require re-sends to be consistent */ if (!(sock->flags & SOCKET_FLAG_ENCRYPT)) { blob2.length = 1+(random() % blob2.length); } else { @@ -443,7 +443,7 @@ _PUBLIC_ int socket_get_fd(struct socket_context *sock) /* call dup() on a socket, and close the old fd. This is used to change the fd to the lowest available number, to make select() more - efficient (select speed depends on the maxiumum fd number passed to + efficient (select speed depends on the maximum fd number passed to it) */ _PUBLIC_ NTSTATUS socket_dup(struct socket_context *sock) diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h index d0fb5e0bfca..ba2c17edd09 100644 --- a/source4/lib/socket/socket.h +++ b/source4/lib/socket/socket.h @@ -103,7 +103,7 @@ enum socket_state { #define SOCKET_FLAG_ENCRYPT 0x00000008 /* This socket * implementation requires * that re-sends be - * consistant, because it + * consistent, because it * is encrypting data. * This modifies the * TESTNONBLOCK case */ diff --git a/source4/lib/stream/packet.c b/source4/lib/stream/packet.c index f78d678de37..c5df55a9c51 100644 --- a/source4/lib/stream/packet.c +++ b/source4/lib/stream/packet.c @@ -531,7 +531,7 @@ _PUBLIC_ void packet_queue_run(struct packet_context *pc) call send_callback. Useful for operations that must occur after sending a message, such - as the switch to SASL encryption after as sucessful LDAP bind relpy. + as the switch to SASL encryption after as successful LDAP bind reply. */ _PUBLIC_ NTSTATUS packet_send_callback(struct packet_context *pc, DATA_BLOB blob, packet_send_callback_fn_t send_callback, diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c index 8db1d76d380..1f7308211b1 100644 --- a/source4/libcli/ldap/ldap_bind.c +++ b/source4/libcli/ldap/ldap_bind.c @@ -334,7 +334,7 @@ try_logon_again: } /* reset the original gensec_features (on the credentials - * context, so we don't tatoo it ) */ + * context, so we don't tattoo it ) */ cli_credentials_set_gensec_features(creds, old_gensec_features, CRED_SPECIFIED); diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c index 8614ccdfd54..db13ad3032f 100644 --- a/source4/libcli/ldap/ldap_client.c +++ b/source4/libcli/ldap/ldap_client.c @@ -52,7 +52,7 @@ static int ldap_connection_destructor(struct ldap_connection *conn) } /** - create a new ldap_connection stucture. The event context is optional + create a new ldap_connection structure. The event context is optional */ _PUBLIC_ struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx, diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index 5b398ee2ced..208dc621547 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -68,7 +68,7 @@ struct smb2_lease_break { struct ntvfs_handle; /* - * a generic container for file handles or file pathes + * a generic container for file handles or file paths * for qfileinfo/setfileinfo and qpathinfo/setpathinfo */ union smb_handle_or_path { @@ -1389,7 +1389,7 @@ enum smb_open_level { union smb_open { /* * because the *.out.file structs are not aligned to the same offset for each level - * we provide a hepler macro that should be used to find the current smb_handle structure + * we provide a helper macro that should be used to find the current smb_handle structure */ #define SMB_OPEN_OUT_FILE(op, file) do { \ switch (op->generic.level) { \ @@ -1455,11 +1455,11 @@ union smb_open { const char *fname; /* these last 2 elements are only used in the - NTTRANS varient of the call */ + NTTRANS variant of the call */ struct security_descriptor *sec_desc; struct smb_ea_list *ea_list; - /* some optional parameters from the SMB2 varient */ + /* some optional parameters from the SMB2 variant */ bool query_maximal_access; bool query_on_disk_id; @@ -2055,7 +2055,7 @@ union smb_lock { uint32_t pid; /* 16 bits in SMB1 */ uint64_t offset; uint64_t count; - } *locks; /* unlocks are first in the arrray */ + } *locks; /* unlocks are first in the array */ } in; } generic, lockx; diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index a4c4cf3d36e..3584cdcbb09 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -173,7 +173,7 @@ struct smbcli_session { the user to control these for torture testing */ uint16_t flags2; - /* the spnego context if we use extented security */ + /* the spnego context if we use extended security */ struct gensec_security *gensec; struct smbcli_session_options { @@ -245,7 +245,7 @@ struct smbcli_request { struct smb_nttrans nttrans; /* information on what to do with a reply when it is received - asyncronously. If this is not setup when a reply is received then + asynchronously. If this is not setup when a reply is received then the reply is discarded The private pointer is private to the caller of the client diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c index b18bc87b6c3..ed834850206 100644 --- a/source4/libcli/raw/rawfileinfo.c +++ b/source4/libcli/raw/rawfileinfo.c @@ -93,7 +93,7 @@ NTSTATUS smb_raw_fileinfo_passthru_parse(const DATA_BLOB *blob, TALLOC_CTX *mem_ { switch (level) { case RAW_FILEINFO_BASIC_INFORMATION: - /* some servers return 40 bytes and some 36. w2k3 return 40, so thats + /* some servers return 40 bytes and some 36. w2k3 return 40, so that's what we should do, but we need to accept 36 */ if (blob->length != 36) { FINFO_CHECK_SIZE(40); @@ -794,7 +794,7 @@ _PUBLIC_ NTSTATUS smb_raw_pathinfo_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_fileinfo *parms) { - /* recv is idential to fileinfo */ + /* recv is identical to fileinfo */ return smb_raw_fileinfo_recv(req, mem_ctx, parms); } diff --git a/source4/libcli/raw/smb.h b/source4/libcli/raw/smb.h index 780260e1679..db12f3f0816 100644 --- a/source4/libcli/raw/smb.h +++ b/source4/libcli/raw/smb.h @@ -292,7 +292,7 @@ /* * Global value meaning that the smb_uid field should be - * ingored (in share level security and protocol level == CORE) + * ignored (in share level security and protocol level == CORE) */ #define UID_FIELD_INVALID 0 diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c index b8447bec4de..09cc10064dc 100644 --- a/source4/libcli/resolve/dns_ex.c +++ b/source4/libcli/resolve/dns_ex.c @@ -242,7 +242,7 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, if (qtype == QTYPE_AAAA && a_num == 0) { /* * DNS server didn't returned A when asked for AAAA records. - * Most of the server do it, let's ask for A specificaly. + * Most of the server do it, let's ask for A specifically. */ err = dns_lookup(tmp_ctx, name, QTYPE_A, &reply); if (ERR_DNS_IS_OK(err)) { diff --git a/source4/libcli/smb2/find.c b/source4/libcli/smb2/find.c index 23ac7378212..559c77dc69f 100644 --- a/source4/libcli/smb2/find.c +++ b/source4/libcli/smb2/find.c @@ -92,7 +92,7 @@ NTSTATUS smb2_find(struct smb2_tree *tree, TALLOC_CTX *mem_ctx, /* - a varient of smb2_find_recv that parses the resulting blob into + a variant of smb2_find_recv that parses the resulting blob into smb_search_data structures */ NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx, @@ -167,7 +167,7 @@ NTSTATUS smb2_find_level_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx, } /* - a varient of smb2_find that parses the resulting blob into + a variant of smb2_find that parses the resulting blob into smb_search_data structures */ NTSTATUS smb2_find_level(struct smb2_tree *tree, TALLOC_CTX *mem_ctx, diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c index 3024e01510a..e10c528b732 100644 --- a/source4/libcli/smb2/request.c +++ b/source4/libcli/smb2/request.c @@ -554,7 +554,7 @@ NTSTATUS smb2_pull_o32s32_blob(struct smb2_request_buffer *buf, TALLOC_CTX *mem_ pull a uint16_t ofs/ uint32_t length/blob triple from a data blob the ptr points to the start of the offset/length pair - In this varient the uint16_t is padded by an extra 2 bytes, making + In this variant the uint16_t is padded by an extra 2 bytes, making the size aligned on 4 byte boundary */ NTSTATUS smb2_pull_o16As32_blob(struct smb2_request_buffer *buf, TALLOC_CTX *mem_ctx, uint8_t *ptr, DATA_BLOB *blob) diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h index 4aadab21c4c..88e651a396c 100644 --- a/source4/libcli/smb2/smb2.h +++ b/source4/libcli/smb2/smb2.h @@ -166,7 +166,7 @@ struct smb2_request { uint16_t credit_charge; /* information on what to do with a reply when it is received - asyncronously. If this is not setup when a reply is received then + asynchronously. If this is not setup when a reply is received then the reply is discarded The private pointer is private to the caller of the client diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c index 242e2cc4456..64bf4c84e66 100644 --- a/source4/libcli/smb_composite/fsinfo.c +++ b/source4/libcli/smb_composite/fsinfo.c @@ -1,5 +1,5 @@ /* - a composite API for quering file system information + a composite API for querying file system information */ #include "includes.h" diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c index 0868cfe5d7c..553132c76bb 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -1,18 +1,18 @@ -/* +/* Unix SMB/CIFS implementation. Copyright (C) Andrew Tridgell 2005 - + This program is free software; you can redistribute it and/or modify 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/>. */ @@ -57,18 +57,18 @@ static int sesssetup_state_destructor(struct sesssetup_state *state) } static NTSTATUS session_setup_old(struct composite_context *c, - struct smbcli_session *session, + struct smbcli_session *session, struct smb_composite_sesssetup *io, - struct smbcli_request **req); + struct smbcli_request **req); static NTSTATUS session_setup_nt1(struct composite_context *c, - struct smbcli_session *session, + struct smbcli_session *session, struct smb_composite_sesssetup *io, - struct smbcli_request **req); + struct smbcli_request **req); static NTSTATUS session_setup_spnego_restart(struct composite_context *c, struct smbcli_session *session, struct smb_composite_sesssetup *io); static NTSTATUS session_setup_spnego(struct composite_context *c, - struct smbcli_session *session, + struct smbcli_session *session, struct smb_composite_sesssetup *io, struct smbcli_request **req); static void smb_composite_sesssetup_spnego_done1(struct tevent_req *subreq); @@ -113,11 +113,11 @@ static void request_handler(struct smbcli_request *req) /* This doesn't work, as this only happens on old * protocols, where this comparison won't match. */ if (NT_STATUS_EQUAL(c->status, NT_STATUS_LOGON_FAILURE)) { - /* we neet to reset the vuid for a new try */ + /* we need to reset the vuid for a new try */ session->vuid = 0; if (cli_credentials_wrong_password(state->io->in.credentials)) { - nt_status = session_setup_old(c, session, - state->io, + nt_status = session_setup_old(c, session, + state->io, &state->req); if (NT_STATUS_IS_OK(nt_status)) { talloc_free(check_req); @@ -141,8 +141,8 @@ static void request_handler(struct smbcli_request *req) /* we need to reset the vuid for a new try */ session->vuid = 0; if (cli_credentials_wrong_password(state->io->in.credentials)) { - nt_status = session_setup_nt1(c, session, - state->io, + nt_status = session_setup_nt1(c, session, + state->io, &state->req); if (NT_STATUS_IS_OK(nt_status)) { talloc_free(check_req); @@ -313,9 +313,9 @@ static void request_handler(struct smbcli_request *req) send a nt1 style session setup */ static NTSTATUS session_setup_nt1(struct composite_context *c, - struct smbcli_session *session, + struct smbcli_session *session, struct smb_composite_sesssetup *io, - struct smbcli_request **req) + struct smbcli_request **req) { -- Samba Shared Repository