]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: Fix code spelling
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 30 Jul 2023 22:14:48 +0000 (10:14 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 25 Oct 2023 22:23:37 +0000 (22:23 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/claims-conversions.c
libcli/security/conditional_ace.c
libcli/security/sddl_conditional_ace.c
libcli/security/tests/data/export-sddl-fuzz-seeds-as-json
libcli/security/tests/test_run_conditional_ace.c
libcli/security/tests/test_sddl_conditional_ace.c
libcli/security/tests/windows/windows-sddl-tests.py
libcli/security/util_sid.c

index 2239b737bc26e05b9461c397727375f9f3ab4c20..968ba1efdb3258ef85589672b7bea47c62ecc7a3 100644 (file)
@@ -46,7 +46,7 @@
  *
  * We don't support the format used by the Win32 API function
  * AddResourceAttributeAce(), which is called CLAIM_SECURITY_ATTRIBUTE_V1.
- * Nobody has ever used that function in public, and it the format is not used
+ * Nobody has ever used that function in public, and the format is not used
  * on the wire.
  */
 
index a0c9a0ccbd1ace8d132ae710119421506d681cc9..e4e838564518682b46c89ec8ae943d2d0ccf28b7 100644 (file)
@@ -33,7 +33,7 @@
  * Conditional ACE logic truth tables.
  *
  * Conditional ACES use a ternary logic, with "unknown" as well as true and
- * false. The ultmate meaning of unknown depends on the context; in a deny
+ * false. The ultimate meaning of unknown depends on the context; in a deny
  * ace, unknown means yes, in an allow ace, unknown means no. That is, we
  * treat unknown results with maximum suspicion.
  *
@@ -744,7 +744,7 @@ static bool resource_claim_lookup(
         * If there is no matching resource ACE, a NULL result is returned,
         * which should compare UNKNOWN to anything. The NULL will have the
         * CONDITIONAL_ACE_FLAG_NULL_MEANS_ERROR flag set if it seems failure
-        * is not simply due to the sought claim not existing. This useful for
+        * is not simply due to the sought claim not existing. This is useful for
         * the Exists and Not_Exists operators.
         */
        size_t i;
@@ -1468,7 +1468,7 @@ static bool compare_composites(const struct ace_condition_token *op,
         * that. This means we can't short-cut by comparing the
         * lengths.
         *
-        * THe extra sad thing is we might have to do it both ways
+        * The extra sad thing is we might have to do it both ways
         * round. For example, comparing {a, a, b, a} to {a, b, c}, we
         * find all of the first group in the second, but that doesn't
         * mean all of the second are in the first.
@@ -2005,7 +2005,7 @@ int run_conditional_ace(TALLOC_CTX *mem_ctx,
  * other error in running it. The *result parameter is set to
  * ACE_CONDITION_FALSE, ACE_CONDITION_TRUE, or ACE_CONDITION_UNKNOWN.
  *
- * ACE_CONDITION_UNKNOWN should be treated pessimistically, as if were
+ * ACE_CONDITION_UNKNOWN should be treated pessimistically, as if it were
  * TRUE for deny ACEs, and FALSE for allow ACEs.
  *
  * @param[in] ace - the ACE being processed.
index 9fc2d8a2c57e10432b1cd75ceb2562da92ce0942..2f243bca6a679b0fba4fa6f1268bc32dc4a65518 100644 (file)
@@ -1203,7 +1203,7 @@ char *sddl_from_conditional_ace(TALLOC_CTX *mem_ctx,
                         * [MS-DTYP]. MS-DTYP uses 'LHS' to describe the
                         * operand of unary operators even though they are
                         * always displayed on the right of the operator. It
-                        * which makes everything much simpler to use rhs
+                        * makes everything much simpler to use rhs
                         * instead.
                         */
                        n_trees--;
@@ -1953,7 +1953,7 @@ static bool parse_sid(struct ace_condition_sddl_compiler_context *comp)
        if (expecting_bare_sids) {
                /*
                 *  This flag is set for a resource ACE which doesn't have the
-                *  SID() wrapper around the the SID string, and not for a
+                *  SID() wrapper around the SID string, and not for a
                 *  conditional ACE, which must have the "SID(...)".
                 *
                 * The resource ACE doesn't need this because there is no
@@ -2779,7 +2779,7 @@ static bool check_resource_attr_type(struct ace_condition_token *tok, char c)
         * etc).
         *
         * We're sticking to the [IUSDXB] codes rather than using converting
-        * earlier to tok->type (whereby this who thing becomes "if (tok->type
+        * earlier to tok->type (whereby this whole thing becomes "if (tok->type
         * == type)") to enable bounds checks on the various integer types.
         */
        switch(c) {
@@ -3173,7 +3173,7 @@ static bool write_resource_attr_from_token(struct sddl_write_context *ctx,
                return sddl_write_unicode(ctx, tok);
 
        case CONDITIONAL_ACE_TOKEN_SID:
-               /* unlike conditional ACE, SID does not had "SID()" wrapper. */
+               /* unlike conditional ACE, SID does not have a "SID()" wrapper. */
                sid = sddl_encode_sid(ctx->mem_ctx, &tok->data.sid.sid, NULL);
                if (sid == NULL) {
                        return false;
index f1e5ae15924ddf82dd81de7b94ac01a25d7b3f7b..cbff661265e628bc535eafd4b17d033be72cb750 100755 (executable)
@@ -4,9 +4,9 @@
 Some of our fuzzers generate SDDL strings with trailing garbage.
 
 This script converts them into the JSON format used by
-windws-sddl-tests.py, though it doesn't parse the SDDL, mapping all
+windows-sddl-tests.py, though it doesn't parse the SDDL, mapping all
 strings to an empty list. The idea is you can feed this through
-windws-sddl-tests.py or something else to get the correct bytes.
+windows-sddl-tests.py or something else to get the correct bytes.
 
 Valid and invalid strings are treated alike, so long as they are
 utf-8. The JSON is un-indented, but structurally equivalent to this:
index c538b7cb55e0ff267bf4217c94cbbf92c7079938..433f830afedd8163d80d5bfccd8bfed4260ce4de 100644 (file)
@@ -263,7 +263,7 @@ static void test_composite_different_order_with_SID_dupes(void **state)
 static void test_composite_mixed_types(void **state)
 {
        /*
-        * If the conditional ACE composite hasa mixed types, it can
+        * If the conditional ACE composite has mixed types, it can
         * never equal a claim, which only has one type.
         */
        INIT()
@@ -513,7 +513,7 @@ static void test_Device_claim_contains_Resource_claim(void **state)
 }
 
 
-static void test_device_claim_comtains_resource_claim(void **state)
+static void test_device_claim_contains_resource_claim(void **state)
 {
        INIT();
        USER_SIDS("WD", "AA");
@@ -635,7 +635,7 @@ int main(_UNUSED_ int argc, _UNUSED_ const char **argv)
                cmocka_unit_test(test_resource_ace_multi),
                cmocka_unit_test(test_resource_ace_multi_any_of),
                cmocka_unit_test(test_user_claim_eq_device_claim),
-               cmocka_unit_test(test_device_claim_comtains_resource_claim),
+               cmocka_unit_test(test_device_claim_contains_resource_claim),
                cmocka_unit_test(test_device_claim_eq_resource_claim),
                cmocka_unit_test(test_Device_claim_contains_Resource_claim),
                cmocka_unit_test(test_not_Not_Contains_1),
index 5ce9dbab87aa56c2ff6c981cac00a7c696187800..61e219614b9858a581606e9f3e32cb952708e276 100644 (file)
@@ -415,7 +415,7 @@ static void test_full_sddl_ra_encode(void **state)
                0x00, 0x00,
                /* ACE starts here, 352 */
                0x09, 0x00, /* type 9, access allowed callback */
-               0x20, 0x00, /* swize 32 */
+               0x20, 0x00, /* size 32 */
                0x3f, 0x00, 0x00, 0x00, /*mask */
                0x01, 0x01, /* S-1-... (1 subauth) */
                0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /*...-16-...*/
index 63c7998bffec91bda3d8cc8e804bf1717131fe19..38acb4479f60680ce1628f4e6aee7b706bb92942 100644 (file)
@@ -147,7 +147,7 @@ def main():
             # maybe 0xffff is an incorrect guess -- it gives use v2 (NT), not v4 (AD)
             c = w.ConvertSecurityDescriptorToStringSecurityDescriptor(sd, 1, 0xffff)
         except Exception as e:
-            print(f"could sot serialize '{sd}': {e}")
+            print(f"could not serialize '{sd}': {e}")
             print(f" derived from       '{a}'")
             exceptions[f"{e} serialize"].append(a)
             unserializeable_cases.append(a)
@@ -166,7 +166,7 @@ def main():
     for k, v in exceptions.items():
         print(f"{k}: {len(v)}")
 
-    print(f"{len(unparseable_cases)} failed to parsed")
+    print(f"{len(unparseable_cases)} failed to parse")
     print(f"{len(parseable_cases)} successfully parsed")
     print(f"{len(unserializeable_cases)} of these failed to re-serialize")
     print(f"{len(round_trip_failures)} of these failed to round trip")
index b6523f6927a2f7d965599b24e3d299a1e68bc725..7c20836314f9f24456123ccc7e2795588d35b85b 100644 (file)
@@ -69,7 +69,7 @@ const struct dom_sid global_sid_Authenticated_Users = /* All authenticated rids
 { 1, 1, {0,0,0,0,0,5}, {11,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
 #if 0
 /* for documentation S-1-5-12 */
-const struct dom_sid global_sid_Restriced =                    /* Restricted Code */
+const struct dom_sid global_sid_Restricted =                   /* Restricted Code */
 { 1, 1, {0,0,0,0,0,5}, {12,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
 #endif