1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

130693 Commits

Author SHA1 Message Date
Martin Schwenke
42aedc62e3 ctdb-tests: Fix typos
These lines are just wrong:

  try_command_on_node -v $test_node "ip addr show to ${test_node}"
  if -n "$out"; then

The 2nd variable referenced should be $test_ip.  The 2nd line causes
"-n: command not found" because it is missing [] test command
brackets.

Both typos would probably make the test pass unconditionally.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-08-25 15:22:36 +00:00
Martin Schwenke
b88e7322d9 ctdb-tests: Reformat script using shfmt -w -p -i 0 -fn
Whitespace changes only.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-08-25 15:22:36 +00:00
Joseph Sutton
f99fb9aa12 python:tests: Allocate OID range for testing to avoid collisions
sid_strings.py used the same OID range as ldap_schema.py, which
occasionally led to test failures when the same OID was generated twice.
Using a different range, and making use of the expected RID if we have
it, should reduce the likelihood of collisions.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Aug 25 13:55:47 UTC 2022 on sn-devel-184
2022-08-25 13:55:47 +00:00
Joseph Sutton
672ec6135f schema_samba4.ldif: Allocate previously added OIDs
DSDB_CONTROL_FORCE_ALLOW_VALIDATED_DNS_HOSTNAME_SPN_WRITE_OID was added
to source4/dsdb/samdb/samdb.h in commit
c2ab1f4696.

DSDB_EXTENDED_SCHEMA_LOAD was added in commit
1fd4cdfafa.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-08-25 12:59:29 +00:00
Ralph Boehme
6d493a9d56 smbd: implement access checks for SMB2-GETINFO as per MS-SMB2 3.3.5.20.1
The spec lists the following as requiring special access:

- for requiring FILE_READ_ATTRIBUTES:

  FileBasicInformation
  FileAllInformation
  FileNetworkOpenInformation
  FileAttributeTagInformation

- for requiring FILE_READ_EA:

  FileFullEaInformation

All other infolevels are unrestricted.

We ignore the IPC related infolevels:

  FilePipeInformation
  FilePipeLocalInformation
  FilePipeRemoteInformation

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153
RN: Missing SMB2-GETINFO access checks from MS-SMB2 3.3.5.20.1

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug 23 12:54:08 UTC 2022 on sn-devel-184
2022-08-23 12:54:08 +00:00
Ralph Boehme
9b2d281571 smbtorture: check required access for SMB2-GETINFO
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-08-23 11:52:29 +00:00
Ralph Boehme
66e40690bd s4/libcli/smb2: avoid using smb2_composite_setpathinfo() in smb2_util_setatr()
smb2_composite_setpathinfo() uses SEC_FLAG_MAXIMUM_ALLOWED which can
have unwanted side effects like breaking oplocks if the effective access
includes [READ|WRITE]_DATA.

For changing the DOS attributes we only need SEC_FILE_WRITE_ATTRIBUTE. With this
change test_smb2_oplock_batch25() doesn't trigger an oplock break anymore.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-08-23 11:52:29 +00:00
Andreas Schneider
339e78f207 gitlab-ci: Add a shellcheck runner
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Mon Aug 22 21:30:09 UTC 2022 on sn-devel-184
2022-08-22 21:30:09 +00:00
Andreas Schneider
f12aa54ba0 testprogs: Fix shellcheck errors in upgradeprovision-oldrelease.sh
testprogs/blackbox/upgradeprovision-oldrelease.sh:134:103: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:140:117: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:145:105: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:151:122: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:156:110: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:162:134: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
c4ba21bc77 testprogs: Fix shellcheck errors in test_wintest.sh
testprogs/blackbox/test_wintest.sh:15:97: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_wintest.sh:40:31: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
355f620653 testprogs: Fix shellcheck errors in test_weak_crypto_server.sh
testprogs/blackbox/test_weak_crypto_server.sh:59:65: error: Use braces
when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
[SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
cd24e2dfb7 testprogs: Fix shellchecks errors in test_pdbtest.sh
testprogs/blackbox/test_pdbtest.sh:61:53: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:73:157: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:76:79: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:78:92: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:80:79: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:90:79: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:92:75: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:96:73: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh💯99: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:104:89: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:111:125: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:115:70: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
150cbc0f3a testprogs: Fix shellcheck errors in test_password_settings.sh
testprogs/blackbox/test_password_settings.sh:48:57: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
d9ebb77c11 testprogs: Fix shellcheck errors in test_kpasswd_heimdal.sh
testprogs/blackbox/test_kpasswd_heimdal.sh:46:57: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
1e4ea99e5f testprogs: Fix shellcheck errors in test_kinit_trusts_mit.sh
testprogs/blackbox/test_kinit_trusts_mit.sh:55:63: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_trusts_mit.sh:109:106: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
391d0cf667 testprogs: Fix shellcheck errors in test_kinit_heimdal.sh
testprogs/blackbox/test_kinit_heimdal.sh:83:107: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:87:126: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:101:126: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:103:154: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:105:112: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:118:195: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:145:154: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:217:122: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_heimdal.sh:251:116: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
4aa50e72b0 testprogs: Fix shellcheck errors in test_kinit_trusts_heimdal.sh
testprogs/blackbox/test_kinit_trusts_heimdal.sh:80:114: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
4ce5d8df25 testprogs: Fix shellcheck errors in test_kinit_mit.sh
testprogs/blackbox/test_kinit_mit.sh:54:62: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:110:107: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:114:126: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:128:126: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:130:154: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:132:118: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:164:195: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:201:154: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:263:122: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_kinit_mit.sh:301:116: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
e4a4ce9cc8 testprogs: Fix shellcheck errors in test_export_keytab_mit.sh
testprogs/blackbox/test_export_keytab_mit.sh:45:47: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:92:98: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:94:106: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:97:117: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh💯166: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:102:177: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:105:155: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:107:173: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_mit.sh:132:94: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
edf0433204 testprogs: Fix shellcheck errors in test_export_keytab_heimdal.sh
testprogs/blackbox/test_export_keytab_heimdal.sh:65:79: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:67:102: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:69:113: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:72:158: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:74:169: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:77:147: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:79:165: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:82:178: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_export_keytab_heimdal.sh:112:80: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
5dd28adeea testprogs: Fix shellcheck errors in test_chgdcpass.sh
testprogs/blackbox/test_chgdcpass.sh:48:79: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_chgdcpass.sh:49:74: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
447e6b9291 testprogs: Fix shellcheck errors in dbcheck-oldrelease.sh
testprogs/blackbox/dbcheck-oldrelease.sh:249:95: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:304:166: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:316:128: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:325:145: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:398:197: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:420:97: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:428:134: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:438:122: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:446:146: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:455:134: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:474:146: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/dbcheck-oldrelease.sh:483:134: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
4b19bbaa93 s4:utils: Fix shellcheck errors in test_samba_tool.sh
source4/utils/tests/test_samba_tool.sh:38:110: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
cbf1f8904b s4:torture: Fix shellcheck errors in test_masktest.sh
source4/torture/tests/test_masktest.sh:26:117: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
0618bd8a6c s4:tortue: Fix shellcheck errors in test_locktest.sh
source4/torture/tests/test_locktest.sh:26:137: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
7a89d22bed s4:torture: Fix shellcheck errors in test_gentest.sh
source4/torture/tests/test_gentest.sh:31:235: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
8c1c63aab8 s4:selftest: Fix shellcheck errors in wintest_rpc.sh
source4/selftest/win/wintest_rpc.sh:61:27: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 20:35:36 +00:00
Andreas Schneider
b7a024e4ef s4:selftest: Fix shellcheck errors in wintest_net.sh
source4/selftest/win/wintest_net.sh:57:27: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Mon Aug 22 15:15:11 UTC 2022 on sn-devel-184
2022-08-22 15:15:11 +00:00
Andreas Schneider
b1e80d02c7 s4:setup: Fix shellcheck errors in provision_fileperms.sh
source4/setup/tests/provision_fileperms.sh:27:14: error: Iterating over
ls output is fragile. Use globs. [SC2045]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
6c2871429f s4:selftest: Fix shellcheck errors in wintest_2k3_dc.sh
source4/selftest/win/wintest_2k3_dc.sh:57:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/win/wintest_2k3_dc.sh:62:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/win/wintest_2k3_dc.sh:85:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/win/wintest_2k3_dc.sh:101:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
4b2f418949 s4:selftest: Fix shellcheck errors in test_w2k3.sh
source4/selftest/test_w2k3.sh:40:67: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/test_w2k3.sh:46:66: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/test_w2k3.sh:48:66: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
d85a2dbfd7 s4:script: Fix shellcheck errors in find_unused_options.sh
source4/script/find_unused_options.sh:20:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/script/find_unused_options.sh:30:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
866b8dcb54 s4:client: Fix shellcheck errors in test_smbclient.sh
source4/client/tests/test_smbclient.sh:31:99: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

source4/client/tests/test_smbclient.sh:41:116: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

source4/client/tests/test_smbclient.sh:43:94: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
a82301d5f2 testprogs: Fix shellcheck errors in common_test_fns.inc
common_test_fns.inc:13:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:32:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:53:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:80:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:106:61: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]

common_test_fns.inc:110:32: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
25e9a74e2e s3:script: Fix shellcheck errors in test_smbstatus.sh
test_smbstatus.sh:78:22: error: Use braces when expanding arrays, e.g.
${array[idx]} (or ${var}[.. to quiet). [SC1087]

test_smbstatus.sh:135:22: error: Use braces when expanding arrays, e.g.
${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
a8b19ebfc8 s3:script: Fix shellcheck errors in test_smbspool.sh
test_smbspool.sh:124:24: error: Couldn't parse this test expression. Fix
to allow more checks. [SC1073]

test_smbspool.sh:124:44: error: If grouping expressions inside [..], use
\( ..\). [SC1026]

test_smbspool.sh:124:46: error: Expected test to end here (don't wrap
commands in []/[[]]). Fix any mentioned problems and try again. [SC1072]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
47eacce86b s3:script: Fix shellcheck errors in test_smbclient_s3.sh
source3/script/tests/test_smbclient_s3.sh:270:5: error: Couldn't parse
this test expression. Fix to allow more checks. [SC1073]

source3/script/tests/test_smbclient_s3.sh:270:11: error: Expected test
to end here (don't wrap commands in []/[[]]). Fix any mentioned problems
and try again. [SC1072]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
ae67e068be s3:script: Fix shellcheck errors in test_rpcclient_samlogon.sh
source3/script/tests/test_rpcclient_samlogon.sh:17:114: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
4abfa262b2 s3:script: Fix shellcheck errors in test_preserve_case.sh
source3/script/tests/test_preserve_case.sh:42:59: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
4edb4d979b s3:script: Fix shellcheck errors in test_net_registry_roundtrip.sh
source3/script/tests/test_net_registry_roundtrip.sh:51:2: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

source3/script/tests/test_net_registry_roundtrip.sh:55:16: error:
Argument mixes string and array. Use * or separate argument. [SC2145]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
6f65ecfe5a s3:script: Fix shellcheck errors in test_net_registry_check.sh
source3/script/tests/test_net_registry_check.sh:33:32: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
4c02eb4df3 s3:script: Fix shellcheck errors in test_net_lookup.sh
source3/script/tests/test_net_lookup.sh:37:9: error: Remove spaces
around = to assign (or use [ ] to compare, or quote '=' if literal).
[SC2283]

Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
8b359fa4df s3:script: Fix shellcheck errors in test_net_cred_change.sh
source3/script/tests/test_net_cred_change.sh:13:64: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
249b8e8af8 s3:script: Fix shellcheck errors in test_dfree_quota.sh
source3/script/tests/test_dfree_quota.sh:125:65: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
8c23b829a1 s3:script: Fix shellcheck errors in test_dfree_command.sh
source3/script/tests/test_dfree_command.sh:38:59: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
3f080f7db6 s3:script: Fix shellcheck errors in dlopen.sh
source3/script/tests/dlopen.sh:51:12: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Andreas Schneider
4b87e58fe4 s3:script: Fix shellcheck errors in mksyms.sh
source3/script/mksyms.sh:33:19: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-08-22 14:20:36 +00:00
Joseph Sutton
75e03ea021 libcli/smb: Set error status if 'iov' pointer is NULL
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15152

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug 22 09:03:29 UTC 2022 on sn-devel-184
2022-08-22 09:03:29 +00:00
Joseph Sutton
40d4912d84 libcli/smb: Ensure we call tevent_req_nterror() on failure
Commit 3594c3ae20 added a NULL check for
'inhdr', but it meant we didn't always call tevent_req_nterror() when we
should.

Now we handle connection errors. We now also set an error status if the
NULL check fails.

I noticed this when an ECONNRESET error from a server refusing SMB1
wasn't handled, and the client subsequently hung in epoll_wait().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15152

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-08-22 08:02:36 +00:00
Ralph Boehme
968a5ae89f smbd: directly pass fsp to SMB_VFS_FGETXATTR() in fget_ea_dos_attribute()
We're now consistently passing the base_fsp to SMB_VFS_FSET_DOS_ATTRIBUTES(), so
we don't need to check for a stream_fsp here anymore.

Additionally vfs_default will assert a non-stream fsp inside
vfswrap_fgetxattr(), so in case any caller wrongly passes a stream fsp, this is
caught in vfs_default.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-08-22 08:02:36 +00:00