From patchwork Mon Dec 30 14:05:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13923302 X-Patchwork-Delegate: plautrba@redhat.com Received: from server02.seltendoof.de (server02.seltendoof.de [168.119.48.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B4191A83E7 for ; Mon, 30 Dec 2024 14:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.48.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735567535; cv=none; b=qROxEeGd5BAAmhu0m2nKT3YMEnPmfogmglOiej4UuV2MUR7zz5+Tp11ibH/YjfNfEnsTSnCoR1LpYEOC1D2EGVv+unj4blHDwk/mMU/a2j2tCiKzHw6zEuVji4Kh+GcK8PyzbTAIXG6AVhCLhsW6cdWlDXXr2cUf6PmP47J8c54= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735567535; c=relaxed/simple; bh=t9j0bou8E4Jpwa23Ft8QN4LCNDdloDHuQD3rkQ1XJIw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dz0Jt1sTmAL2TWRWJBS170gNONFETf2UtQF3OFmKq9plFRfsrdwMl/b/YydMVoYEjxIAWppIMnyGG1TMtE/JPCLKn62EQq5ZSAEAlYrxPyikhM+wQLTLrQq5XkWaZuegcVQNQSS0CBp6dFH/1Wn9f/dSORzNKBAWCb70x1uGzyM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seltendoof.de; spf=pass smtp.mailfrom=seltendoof.de; dkim=pass (2048-bit key) header.d=seltendoof.de header.i=@seltendoof.de header.b=ApkYmbJp; arc=none smtp.client-ip=168.119.48.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seltendoof.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=seltendoof.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=seltendoof.de header.i=@seltendoof.de header.b="ApkYmbJp" From: =?utf-8?q?Christian_G=C3=B6ttsche?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seltendoof.de; s=2023072701; t=1735567531; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YRz0r+U4EnvKxFThMEJu3SMjpLoeSGHYqw9Uf8yKv8Q=; b=ApkYmbJpttJaW4qSa02b4jzqge3PX1S0xwIkzTlbKaM6+USIF7vVaca8wo5O+MU9tKF0xH B+0aOczQSUX779rrtmCJpBWsnl8mqfPAdIP24m6fJK7Tbv3eN4CwQwpCkLog05n8Y49Moz zh9ITRTSP2n6tm0WwO1O3v221wz1Z2qo+8HnMxQQU4sYeLQPGHaFnksQhM7cX3KKMOXRt1 PGUYbJULgPXLqa5Fx90j5a3MzYxjAwlgik8L/F12JT4MB4uzt2DLv11YQfROrRfKLw02KS 1LY6gnL1BFn6aGUufvgeR8BnUgVTXoXicYTap9cZtznehUcL6Uqk/mfB+84QOQ== To: selinux@vger.kernel.org Cc: =?utf-8?q?Christian_G=C3=B6ttsche?= Subject: [PATCH 1/2] libsepol: fix typos Date: Mon, 30 Dec 2024 15:05:23 +0100 Message-ID: <20241230140523.60053-2-cgoettsche@seltendoof.de> In-Reply-To: <20241230140523.60053-1-cgoettsche@seltendoof.de> References: <20241230140523.60053-1-cgoettsche@seltendoof.de> Reply-To: cgzones@googlemail.com Precedence: bulk X-Mailing-List: selinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Christian Göttsche Found by codespell(1) and typos[1]. [1]: https://github.com/crate-ci/typos Signed-off-by: Christian Göttsche --- libsepol/src/kernel_to_cil.c | 2 +- libsepol/src/module_to_cil.c | 2 +- libsepol/src/policydb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libsepol/src/kernel_to_cil.c b/libsepol/src/kernel_to_cil.c index 2d563e7d..ddca2b62 100644 --- a/libsepol/src/kernel_to_cil.c +++ b/libsepol/src/kernel_to_cil.c @@ -1802,7 +1802,7 @@ static char *avtab_node_to_str(struct policydb *pdb, avtab_key_t *key, avtab_dat } else if (datum->xperms->specified == AVTAB_XPERMS_NLMSG) { xperm = (char *) "nlmsg"; } else { - ERR(NULL, "Unknown extended permssion"); + ERR(NULL, "Unknown extended permission"); goto exit; } rule = create_str("(%s %s %s (%s %s (%s)))", diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c index 0ede0c9b..ae9a2b5d 100644 --- a/libsepol/src/module_to_cil.c +++ b/libsepol/src/module_to_cil.c @@ -709,7 +709,7 @@ static int avrulex_to_cil(int indent, struct policydb *pdb, uint32_t type, const } else if (xperms->specified == AVTAB_XPERMS_NLMSG) { xperm = "nlmsg"; } else { - ERR(NULL, "Unkown avrule xperms->specified: %i", xperms->specified); + ERR(NULL, "Unknown avrule xperms->specified: %i", xperms->specified); rc = -1; goto exit; } diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c index 0747e789..8443380b 100644 --- a/libsepol/src/policydb.c +++ b/libsepol/src/policydb.c @@ -1662,7 +1662,7 @@ int policydb_load_isids(policydb_t * p, sidtab_t * s) * * arguments: * policydb_t *pol module policy to modify - * uint32_t sym the symbole table for insertion (SYM_*) + * uint32_t sym the symbol table for insertion (SYM_*) * hashtab_key_t key the key for the symbol - not cloned * hashtab_datum_t data the data for the symbol - not cloned * scope scope of this symbol, either SCOPE_REQ or SCOPE_DECL From patchwork Mon Dec 30 14:05:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13923303 X-Patchwork-Delegate: plautrba@redhat.com Received: from server02.seltendoof.de (server02.seltendoof.de [168.119.48.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 214111C32 for ; Mon, 30 Dec 2024 14:05:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.48.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735567536; cv=none; b=tk2QIazjK8EptBP7Mo9D8sStnJGVJQUBeQGb01BO3nM9q/P104Ffzr+8ni9x/GmQLslvmZEvGEgh0XzGM74XhUmoEgvailxoK0KdPl6qpqWHre9FNUqMZK/zRePqrFkPx4mXgNz210d066OJ7qSiL1fzUy1UJCOg7AfHTz6YTqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735567536; c=relaxed/simple; bh=7zt8iorEmIE3g8IPmjce1JcNR/LW0FwGKanFwx8DCIQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=kvCH3nvYA6uT0eh2Vn8kxl8u3DU8MoqQd9Gm49vfNtRx+jzYGE2APLOvHvJGPDps+e3oIfERigM+1haLzTXbzWUJSqfszN2tDfV2F/d589wpjoaGv7KkCpMIPXat+UaLNRfGtm8czK7YfJ5Ry+8Hh/MMuDkqTf5P/MNn4R8//uM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seltendoof.de; spf=pass smtp.mailfrom=seltendoof.de; dkim=pass (2048-bit key) header.d=seltendoof.de header.i=@seltendoof.de header.b=BEWmsNF+; arc=none smtp.client-ip=168.119.48.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=seltendoof.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=seltendoof.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=seltendoof.de header.i=@seltendoof.de header.b="BEWmsNF+" From: =?utf-8?q?Christian_G=C3=B6ttsche?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seltendoof.de; s=2023072701; t=1735567530; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q7s7M5oHeTmJqWb48Z2cOEY0xgteRz4my6g5TanzvOA=; b=BEWmsNF+GUnHrSZo/XvfYMRuhpiD5vgAHVM799bNwlzMfj7R5KPWX5Y9maf3M2JhDaxp9m optP0naBnkJ6GtjmoBidoW0VR4+SurNVmk2RXJut69UP8Y3yXmEQYZKmiWYGwB4mK5/Gyo smwn9heLEi4ayX5qoJfq4rBGrGhPwo3DzRHoS/6SZbEaV+fdZq9bfdnEvZkBCOZPSVOSyo bhKGNcH/3AOXOviPOfk6Y5k1SgMo/Z1Mtfj04BFLI5+zZLoCm9Zn4iufSnknaZjARFXAY0 MHx6/mKFkL2uECL17Af4F7F4YQzISO/AHrozZVtBXc7HsJvU+V4s69dZPMIBXA== To: selinux@vger.kernel.org Cc: =?utf-8?q?Christian_G=C3=B6ttsche?= Subject: [PATCH 2/2] python: fix typos Date: Mon, 30 Dec 2024 15:05:22 +0100 Message-ID: <20241230140523.60053-1-cgoettsche@seltendoof.de> Reply-To: cgzones@googlemail.com Precedence: bulk X-Mailing-List: selinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Christian Göttsche Found by codespell(1) and typos[1]. [1]: https://github.com/crate-ci/typos Signed-off-by: Christian Göttsche --- python/sepolgen/src/sepolgen/module.py | 2 +- python/sepolgen/src/sepolgen/objectmodel.py | 2 +- python/sepolgen/src/sepolgen/refpolicy.py | 6 +++--- python/sepolicy/sepolicy/sepolicy.glade | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/sepolgen/src/sepolgen/module.py b/python/sepolgen/src/sepolgen/module.py index 745364cd..b7d64627 100644 --- a/python/sepolgen/src/sepolgen/module.py +++ b/python/sepolgen/src/sepolgen/module.py @@ -111,7 +111,7 @@ class ModuleCompiler: .semodule_package [string] Fully qualified path to the module packager. Defaults to /usr/bin/semodule_package. .output [file object] File object used to write verbose - output of the compililation and packaging process. + output of the compilation and packaging process. """ def __init__(self, output=None): """Create a ModuleCompiler instance, optionally with an diff --git a/python/sepolgen/src/sepolgen/objectmodel.py b/python/sepolgen/src/sepolgen/objectmodel.py index ccce86c1..29c18ec8 100644 --- a/python/sepolgen/src/sepolgen/objectmodel.py +++ b/python/sepolgen/src/sepolgen/objectmodel.py @@ -59,7 +59,7 @@ implicitly_typed_objects = ["socket", "fd", "process", "file", "lnk_file", "fifo # to and object ("write") or to a subject from an object ("read"). Read # or write is described from the subject point-of-view. It is also possible # for a permission to represent both a read and write (though the flow is -# typical asymettric in terms of bandwidth). It is also possible for +# typical asymmetric in terms of bandwidth). It is also possible for # permission to not flow information (meaning that the result is pure # side-effect). # diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py index 32278896..78725397 100644 --- a/python/sepolgen/src/sepolgen/refpolicy.py +++ b/python/sepolgen/src/sepolgen/refpolicy.py @@ -324,7 +324,7 @@ class SecurityContext(Leaf): def to_string(self, default_level=None): """Return a string representing this security context. - By default, the string will contiain a MCS / MLS level + By default, the string will contain a MCS / MLS level potentially from the default which is passed in if none was set. @@ -333,7 +333,7 @@ class SecurityContext(Leaf): empty string. Returns: - A string represening the security context in the form + A string representing the security context in the form 'user:role:type:level'. """ fields = [self.user, self.role, self.type] @@ -609,7 +609,7 @@ class AVRule(Leaf): def to_string(self): """Return a string representation of the rule that is a valid policy language representation (assuming - that the types, object class, etc. are valie). + that the types, object class, etc. are valid). """ if self.gen_cil: s = "" diff --git a/python/sepolicy/sepolicy/sepolicy.glade b/python/sepolicy/sepolicy/sepolicy.glade index 30e7b03f..a9e4cb3a 100644 --- a/python/sepolicy/sepolicy/sepolicy.glade +++ b/python/sepolicy/sepolicy/sepolicy.glade @@ -235,7 +235,7 @@ - + @@ -392,7 +392,7 @@ - + @@ -5538,7 +5538,7 @@ s0-s0:c1023 - +