From e3fdc1cb69d591b47c101b0015c6ef90a526112f Mon Sep 17 00:00:00 2001 From: Michel Decima Date: Wed, 14 Sep 2022 16:18:28 +0200 Subject: [PATCH 1/6] license: add LICENSE file --- LICENSE.md | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..1d1826a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,160 @@ +# Inner Source terms of use v1.0 + +The accompanying Component is provided under the current terms of use. +Any installation and use of the Component constitute recipient's acceptance of these terms. + +THESE TERMS MAY BE COPIED OR DISTRIBUTED BUT IN ORDER TO AVOID INCONSISTENCY. +THESE TERMS MAY ONLY BE MODIFIED BY ORANGE SA LEGAL DEPARTMENT – INTELLECTUAL +PROPERTY. + +1. DEFINITIONS + + 1.1 *Affiliate*: any entity in which Orange SA, acting alone or in concert, + holds (i) directly or indirectly more than fifty percent (50%) of the + voting rights in general meetings of shareholders, or (ii) holds the right + to appoint the majority of the members of the Board of Directors or of a + body fulfilling a similar function. Such entities will be considered as + Orange SA subsidiaries only as long as one of the aforementioned criteria + is met. + + 1.2 *Component*: any software’s source code, document, design, picture, database + provided by the Inner Source Project under these Inner Source terms of use. + + 1.3 *Inner Source Project*: Orange SA’s project that decides to make available + the Component under these Inner Source terms of use. + +2. OBJECTIVE OF THE DOCUMENT + + Inner Source aims to strengthen collaboration within Orange Group. Therefore, + these terms give a comprehensive list of the rules that must be applied to + each Component in order to comply with Orange’s inner source principles, + secure the copyright rights of Orange SA and/or any of its Affiliates and + allow the use of the Component by users to improve collaboration within Orange + Group. + + Two categories of users have been identified: + + - *Internal Users*: Orange SA staff (employees, PhD students, apprentices, + interns) + - *External Users*: Orange Affiliates’ staffs, external partners, + subcontractors, and any other entity which is not part of Orange SA. + +3. CONDITIONS APPLICABLE TO INTERNAL USERS + + a. Rights + + Permission is hereby granted, free of charge, to any Internal User, to: + Permission is hereby granted, free of charge, to any Internal User, to: + Permission is hereby granted, free of charge, to any Internal User, to: + + - access to the Component including but not limited to the source code of + the software and associated technical documentation; + - use the Component; + - contribute to the Component by submitting patches and/or major + contributions to the Orange SA’s Inner Source Project; + - copy, reproduce and duplicate the Component internally and only for the + needs of any Internal User’s Orange SA’s projects; + - modify and merge the Component for the needs of any Internal User’s Orange + SA’s projects; + - make available the Component within Orange SA only, modified or not. + + b.Duties + + In consideration of the rights granted above, each Internal User must comply + with the following conditions: + + - Do not copy, publish, distribute, sublicence or sell the Component in any + form outside Orange SA without informing Orange SA’s Inner Source Project + and the agreement of the Intellectual Property and Licensing (IPL) + department. + - Do not delete or modify the copyright notice that may have been inserted + within the Component (see point 7 below) and these terms of use; + - Give credit to the original authors of the Component; + - Do not link, compile or otherwise the Component with any other component + published under GNU GPL license or GNU Affero license or any copyleft + license without the prior approval of the open source governance; + - Inform Orange SA’s Inner Source Project of any duplication of the + project/component (fork) or any modifications/enhancements made to the + Component. + +4. CONDITIONS APPLICABLE TO EXTERNAL USERS + + 4.1 External Users must execute an agreement with Orange SA to have access to + and use the Component. External Users shall use Orange SA’s Component + under the conditions defined in the contract the External Users entered + into with Orange SA. + + 4.2 When an External User is an Affiliate, any supplier contracts with the + Affiliate shall include a formal statement that the supplier transfers all + copyright rights to the Affiliate. + + 4.3 When an External user is an Affiliate and provided that the Component is + invoiced or recharged to one or more business unit or Affiliate, in that + case Orange SA hereby grants to the Affiliate a personal, + non-transferable, non-exclusive free licence to have access to the + Component on its own equipment only for six (6) months and solely for the + purposes of the technical evaluation of the Component by the Affiliate and + understanding its mechanisms, and induced software architecture as the + case may be, as well as its interest to develop one or more features + within the framework of the Orange’s Inner Source ecosystem. + The Affiliate may make copies of the Component that are necessary to + evaluate the Component on its own equipment but may not make any back-up or + archival copies and may not load all or any part of the Component on any + computer other than its own equipment. + No other rights, even implied, are granted herein, other than those + mentioned above, especially the Affiliate is not allowed: + + - to modify, adapt, translate or create derivative works based on the + Component; + - to sublicense, distribut e, disclose, market, rent, lease, or transfer the + Component to any third party such as but not limited to subcontractors. + + The Affiliate acknowledges that any disclosure pursuant to these terms of + use shall not transfer or confer to the Affiliate any intellectual property + or other rights in relation to the Component. + In case the Affiliate wishes to take part to the development/enhancement + of the Component and contribute to it, the Affiliate shall contact the + Inner Source Project in order to put in place the contractual agreements + accordingly. + +5. NO WARRANTY + + THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ORANGE + SA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + COMPONENT OR THE USE OR OTHER DEALINGS IN THE COMPONENT. + +6. TERMINATION + + Any failure to comply with the current terms of use will terminate any rights + to use the Component if no cure of such failure has been carried out within + ten (10) days after becoming aware of such noncompliance and/or if the user + ceases to be an Orange’s staff or to be in an agreement with Orange. + + In case of termination of these terms of use, the user agrees to cease any use + of the Component and delete any copy of the Component. + +7. COPYRIGHT NOTICE TO BE INCLUDED INTO THE HEADERS FILES + + ```javascript + /* + * Software Name : + * Version: + * SPDX-FileCopyrightText: Copyright (c) [-] Orange SA + * + * This software is confidential and proprietary information of Orange SA. + * You shall not disclose such Confidential Information and shall not copy, use + * or distribute it in whole or in part without the prior written consent of + * Orange SA + * + * Author: + * Software description: + */ + ``` + + Where: + - ``: year of the first publication; + - ``: year of the latest published version; + - ``: Only include the name of authors who agreed to be identified. From 807f7118e3ba82dffac6e21a9fd211e8ad4bb325 Mon Sep 17 00:00:00 2001 From: Michel Decima Date: Wed, 14 Sep 2022 16:22:57 +0200 Subject: [PATCH 2/6] license: add common license header --- debian/postinst | 2 ++ debian/postrm | 2 ++ debian/preinst | 2 ++ debian/prerm | 2 ++ usr/sbin/pkcs11_generate_uids | 15 ++++++++++++--- usr/share/orange-yourdev-login/login-password | 13 +++++++++++-- usr/share/orange-yourdev-login/login-pki | 13 +++++++++++-- 7 files changed, 42 insertions(+), 7 deletions(-) diff --git a/debian/postinst b/debian/postinst index b204e28..e85e9c1 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: Orange-InnerSource + set -e case "$1" in diff --git a/debian/postrm b/debian/postrm index f8355bb..642ef06 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: Orange-InnerSource + set -e case "$1" in diff --git a/debian/preinst b/debian/preinst index 4554297..5f28c08 100644 --- a/debian/preinst +++ b/debian/preinst @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: Orange-InnerSource + set -e case "$1" in diff --git a/debian/prerm b/debian/prerm index 8c7300c..63fb99a 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: Orange-InnerSource + set -e case "$1" in diff --git a/usr/sbin/pkcs11_generate_uids b/usr/sbin/pkcs11_generate_uids index 6552844..313ea8e 100755 --- a/usr/sbin/pkcs11_generate_uids +++ b/usr/sbin/pkcs11_generate_uids @@ -1,7 +1,16 @@ #!/bin/bash -# -# Written by Michel Decima -# Copyright 2021 Orange +# +# Software Name : orange-yourdev-login +# SPDX-License-Identifier: Orange-InnerSource +# SPDX-FileCopyrightText: Copyright (c) 2020-2022 Orange SA +# +# This software is confidential and proprietary information of Orange SA. +# You shall not disclose such Confidential Information and shall not copy, +# use or distribute it in whole or in part without the prior written +# consent of Orange SA. +# +# Author: Michel Decima +# # # Generate uid mapping for pam_pkcs11 using /etc/passwd # diff --git a/usr/share/orange-yourdev-login/login-password b/usr/share/orange-yourdev-login/login-password index 03f97d2..08042e9 100755 --- a/usr/share/orange-yourdev-login/login-password +++ b/usr/share/orange-yourdev-login/login-password @@ -1,9 +1,18 @@ #!/bin/bash # -# Written by Michel Decima -# Copyright (C) 2020 Orange +# Software Name : orange-yourdev-login +# SPDX-License-Identifier: Orange-InnerSource +# SPDX-FileCopyrightText: Copyright (c) 2020-2022 Orange SA +# +# This software is confidential and proprietary information of Orange SA. +# You shall not disclose such Confidential Information and shall not copy, +# use or distribute it in whole or in part without the prior written +# consent of Orange SA. +# +# Author: Michel Decima # + (( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; } if [ -e /etc/pam.d/gdm-smartcard-sssd-or-password ] ; then diff --git a/usr/share/orange-yourdev-login/login-pki b/usr/share/orange-yourdev-login/login-pki index 791f3aa..f0e9429 100755 --- a/usr/share/orange-yourdev-login/login-pki +++ b/usr/share/orange-yourdev-login/login-pki @@ -1,9 +1,18 @@ #!/bin/bash # -# Written by Michel Decima -# Copyright (C) 2020 Orange +# Software Name : orange-yourdev-login +# SPDX-License-Identifier: Orange-InnerSource +# SPDX-FileCopyrightText: Copyright (c) 2020-2022 Orange SA +# +# This software is confidential and proprietary information of Orange SA. +# You shall not disclose such Confidential Information and shall not copy, +# use or distribute it in whole or in part without the prior written +# consent of Orange SA. +# +# Author: Michel Decima # + (( EUID == 0 )) || { echo >&2 "Not root." ; exit 1 ; } update-alternatives --set gdm-smartcard \ From a650c659fdd7e2a621da8f09f6c8d51ad65a6f6f Mon Sep 17 00:00:00 2001 From: Michel Decima Date: Wed, 14 Sep 2022 16:23:24 +0200 Subject: [PATCH 3/6] license: update debian/copyright --- debian/copyright | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/copyright b/debian/copyright index e534d5e..68c70cc 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,8 +3,8 @@ Upstream-Name: orange-yourdev-pki-login Source: https://gitlab.forge.orange-labs.fr/yourdev/orange-yourdev-login Files: * ./debian/* -Copyright: 2021, Orange Labs -License: GPL-2 - On Debian systems, the full text of the GNU General Public - License version 2 can be found in the file - '/usr/share/common-licenses/GPL-2'. +Copyright: 2020-2022 Orange SA +License: Orange-InnerSource + On Debian systems, the full text of the Orange Inner-Source terms of use + can be found in the file `/usr/share/common-licenses/Orange-InnerSource'. + From 35d8bbf7fdab04f76fa7a8dead31c7e65048e7ea Mon Sep 17 00:00:00 2001 From: Michel Decima Date: Fri, 30 Sep 2022 18:47:39 +0200 Subject: [PATCH 4/6] license: typo in LICENSE.md --- LICENSE.md | 207 +++++++++++++++++++++++++++++------------------------ 1 file changed, 112 insertions(+), 95 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 1d1826a..6364cde 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,8 @@ # Inner Source terms of use v1.0 -The accompanying Component is provided under the current terms of use. -Any installation and use of the Component constitute recipient's acceptance of these terms. +The accompanying Component is provided under the current terms of use. Any +installation and use of the Component constitute recipient's acceptance of +these terms. THESE TERMS MAY BE COPIED OR DISTRIBUTED BUT IN ORDER TO AVOID INCONSISTENCY. THESE TERMS MAY ONLY BE MODIFIED BY ORANGE SA LEGAL DEPARTMENT – INTELLECTUAL @@ -9,109 +10,121 @@ PROPERTY. 1. DEFINITIONS - 1.1 *Affiliate*: any entity in which Orange SA, acting alone or in concert, - holds (i) directly or indirectly more than fifty percent (50%) of the - voting rights in general meetings of shareholders, or (ii) holds the right - to appoint the majority of the members of the Board of Directors or of a - body fulfilling a similar function. Such entities will be considered as - Orange SA subsidiaries only as long as one of the aforementioned criteria - is met. + 1.1. *Affiliate*: any entity in which Orange SA, acting alone or in + concert, holds (i) directly or indirectly more than fifty percent + (50%) of the voting rights in general meetings of shareholders, or + (ii) holds the right to appoint the majority of the members of the + Board of Directors or of a body fulfilling a similar function. Such + entities will be considered as Orange SA subsidiaries only as long as + one of the aforementioned criteria is met. - 1.2 *Component*: any software’s source code, document, design, picture, database - provided by the Inner Source Project under these Inner Source terms of use. + 1.2. *Component*: any software’s source code, document, design, picture, + database provided by the Inner Source Project under these Inner + Source terms of use. - 1.3 *Inner Source Project*: Orange SA’s project that decides to make available - the Component under these Inner Source terms of use. + 1.3. *Inner Source Project*: Orange SA’s project that decides to make + available the Component under these Inner Source terms of use. 2. OBJECTIVE OF THE DOCUMENT - Inner Source aims to strengthen collaboration within Orange Group. Therefore, - these terms give a comprehensive list of the rules that must be applied to - each Component in order to comply with Orange’s inner source principles, - secure the copyright rights of Orange SA and/or any of its Affiliates and - allow the use of the Component by users to improve collaboration within Orange - Group. + Inner Source aims to strengthen collaboration within Orange Group. + Therefore, these terms give a comprehensive list of the rules that must be + applied to each Component in order to comply with Orange’s inner source + principles, secure the copyright rights of Orange SA and/or any of its + Affiliates and allow the use of the Component by users to improve + collaboration within Orange Group. Two categories of users have been identified: - *Internal Users*: Orange SA staff (employees, PhD students, apprentices, - interns) + interns) + - *External Users*: Orange Affiliates’ staffs, external partners, - subcontractors, and any other entity which is not part of Orange SA. + subcontractors, and any other entity which is not part of Orange SA. 3. CONDITIONS APPLICABLE TO INTERNAL USERS a. Rights - Permission is hereby granted, free of charge, to any Internal User, to: - Permission is hereby granted, free of charge, to any Internal User, to: Permission is hereby granted, free of charge, to any Internal User, to: - access to the Component including but not limited to the source code of - the software and associated technical documentation; + the software and associated technical documentation; + - use the Component; + - contribute to the Component by submitting patches and/or major - contributions to the Orange SA’s Inner Source Project; + contributions to the Orange SA’s Inner Source Project; + - copy, reproduce and duplicate the Component internally and only for the - needs of any Internal User’s Orange SA’s projects; - - modify and merge the Component for the needs of any Internal User’s Orange - SA’s projects; + needs of any Internal User’s Orange SA’s projects; + + - modify and merge the Component for the needs of any Internal User’s + Orange SA’s projects; + - make available the Component within Orange SA only, modified or not. - b.Duties + b. Duties - In consideration of the rights granted above, each Internal User must comply - with the following conditions: + In consideration of the rights granted above, each Internal User must + comply with the following conditions: + + - Do not copy, publish, distribute, sublicence or sell the Component in + any form outside Orange SA without informing Orange SA’s Inner Source + Project and the agreement of the Intellectual Property and Licensing + (IPL) department. - - Do not copy, publish, distribute, sublicence or sell the Component in any - form outside Orange SA without informing Orange SA’s Inner Source Project - and the agreement of the Intellectual Property and Licensing (IPL) - department. - Do not delete or modify the copyright notice that may have been inserted - within the Component (see point 7 below) and these terms of use; + within the Component (see point 7 below) and these terms of use; + - Give credit to the original authors of the Component; + - Do not link, compile or otherwise the Component with any other component - published under GNU GPL license or GNU Affero license or any copyleft - license without the prior approval of the open source governance; + published under GNU GPL license or GNU Affero license or any copyleft + license without the prior approval of the open source governance; + - Inform Orange SA’s Inner Source Project of any duplication of the - project/component (fork) or any modifications/enhancements made to the - Component. + project/component (fork) or any modifications/enhancements made to the + Component. 4. CONDITIONS APPLICABLE TO EXTERNAL USERS - 4.1 External Users must execute an agreement with Orange SA to have access to - and use the Component. External Users shall use Orange SA’s Component - under the conditions defined in the contract the External Users entered - into with Orange SA. + 4.1. External Users must execute an agreement with Orange SA to have + access to and use the Component. External Users shall use Orange SA’s + Component under the conditions defined in the contract the External + Users entered into with Orange SA. - 4.2 When an External User is an Affiliate, any supplier contracts with the - Affiliate shall include a formal statement that the supplier transfers all - copyright rights to the Affiliate. + 4.2. When an External User is an Affiliate, any supplier contracts with + the Affiliate shall include a formal statement that the supplier + transfers all copyright rights to the Affiliate. - 4.3 When an External user is an Affiliate and provided that the Component is - invoiced or recharged to one or more business unit or Affiliate, in that - case Orange SA hereby grants to the Affiliate a personal, - non-transferable, non-exclusive free licence to have access to the - Component on its own equipment only for six (6) months and solely for the - purposes of the technical evaluation of the Component by the Affiliate and - understanding its mechanisms, and induced software architecture as the - case may be, as well as its interest to develop one or more features - within the framework of the Orange’s Inner Source ecosystem. - The Affiliate may make copies of the Component that are necessary to - evaluate the Component on its own equipment but may not make any back-up or - archival copies and may not load all or any part of the Component on any - computer other than its own equipment. - No other rights, even implied, are granted herein, other than those - mentioned above, especially the Affiliate is not allowed: + 4.3. When an External user is an Affiliate and provided that the Component + is invoiced or recharged to one or more business unit or Affiliate, + in that case Orange SA hereby grants to the Affiliate a personal, + non-transferable, non-exclusive free licence to have access to the + Component on its own equipment only for six (6) months and solely for + the purposes of the technical evaluation of the Component by the + Affiliate and understanding its mechanisms, and induced software + architecture as the case may be, as well as its interest to develop + one or more features within the framework of the Orange’s Inner + Source ecosystem. The Affiliate may make copies of the Component that + are necessary to evaluate the Component on its own equipment but may + not make any back-up or archival copies and may not load all or any + part of the Component on any computer other than its own equipment. + No other rights, even implied, are granted herein, other than those + mentioned above, especially the Affiliate is not allowed: - - to modify, adapt, translate or create derivative works based on the - Component; - - to sublicense, distribut e, disclose, market, rent, lease, or transfer the - Component to any third party such as but not limited to subcontractors. + - to modify, adapt, translate or create derivative works based on the + Component; + + - to sublicense, distribut e, disclose, market, rent, lease, or transfer + the Component to any third party such as but not limited to + subcontractors. The Affiliate acknowledges that any disclosure pursuant to these terms of - use shall not transfer or confer to the Affiliate any intellectual property - or other rights in relation to the Component. + use shall not transfer or confer to the Affiliate any intellectual + property or other rights in relation to the Component. + In case the Affiliate wishes to take part to the development/enhancement of the Component and contribute to it, the Affiliate shall contact the Inner Source Project in order to put in place the contractual agreements @@ -119,42 +132,46 @@ PROPERTY. 5. NO WARRANTY - THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ORANGE - SA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - COMPONENT OR THE USE OR OTHER DEALINGS IN THE COMPONENT. + THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + NO EVENT SHALL ORANGE SA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE COMPONENT OR THE USE OR OTHER + DEALINGS IN THE COMPONENT. 6. TERMINATION - Any failure to comply with the current terms of use will terminate any rights - to use the Component if no cure of such failure has been carried out within - ten (10) days after becoming aware of such noncompliance and/or if the user - ceases to be an Orange’s staff or to be in an agreement with Orange. + Any failure to comply with the current terms of use will terminate any + rights to use the Component if no cure of such failure has been carried + out within ten (10) days after becoming aware of such noncompliance and/or + if the user ceases to be an Orange’s staff or to be in an agreement with + Orange. - In case of termination of these terms of use, the user agrees to cease any use - of the Component and delete any copy of the Component. + In case of termination of these terms of use, the user agrees to cease any + use of the Component and delete any copy of the Component. 7. COPYRIGHT NOTICE TO BE INCLUDED INTO THE HEADERS FILES ```javascript /* - * Software Name : - * Version: - * SPDX-FileCopyrightText: Copyright (c) [-] Orange SA - * - * This software is confidential and proprietary information of Orange SA. - * You shall not disclose such Confidential Information and shall not copy, use - * or distribute it in whole or in part without the prior written consent of - * Orange SA - * - * Author: - * Software description: - */ + * Software Name: + * Version: + * SPDX-FileCopyrightText: Copyright (c) [-] Orange SA + * + * This software is confidential and proprietary information of Orange SA. + * You shall not disclose such Confidential Information and shall not copy, + * use or distribute it in whole or in part without the prior written + * consent of Orange SA. + * + * Author: + * Software Description: + */ ``` Where: - - ``: year of the first publication; - - ``: year of the latest published version; - - ``: Only include the name of authors who agreed to be identified. + + - ``: Year of the first publication; + - ``: Year of the latest published version; + - ``: Only include the name of authors who agreed to be + identified. From a489398c4ac075f2caf2f9c0cc87d9a10d3c8a43 Mon Sep 17 00:00:00 2001 From: jfv Date: Thu, 12 Jan 2023 09:07:14 +0100 Subject: [PATCH 5/6] Improve password rules for local accounts --- debian/control | 1 + debian/postinst | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/debian/control b/debian/control index 0bda328..6012ffe 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,7 @@ Depends: ${misc:Depends}, libpam-sss, libpam-pkcs11, libpam-ccreds, + libpam-pwquality, orange-certs, orange-krb5 Recommends: diff --git a/debian/postinst b/debian/postinst index e85e9c1..548c423 100644 --- a/debian/postinst +++ b/debian/postinst @@ -3,6 +3,14 @@ set -e +CONF_FILE="/etc/security/pwquality.conf" + +yd_update_keyval() { # file key value... + local file="$1" key="$2" ; shift 2 + # delete line starting with key then append to the end + sed -e "/^[ \t]*$key[ \t]\=/d" -e "\$a$key = $*" -i "$file" +} + case "$1" in configure) # Enable GDM customization @@ -57,6 +65,21 @@ case "$1" in ;; esac +# Min size of password +yd_update_keyval "$CONF_FILE" "minlen" "12" + +# Lowercase char (-1 => min 1 char) +yd_update_keyval "$CONF_FILE" "lcredit" "-1" + +# Uppercase char (-1 => min 1 char) +yd_update_keyval "$CONF_FILE" "ucredit" "-1" + +# Decimal char (-1 => min 1 char) +yd_update_keyval "$CONF_FILE" "dcredit" "-1" + +# Other char (-1 => min 1 char) +yd_update_keyval "$CONF_FILE" "ocredit" "-1" + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. From 7c370fded7d550d19dcec6c94e047345690688ff Mon Sep 17 00:00:00 2001 From: jfv Date: Fri, 13 Jan 2023 16:09:10 +0100 Subject: [PATCH 6/6] Update rule about password min size from 12 to 10 --- debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 548c423..ab94940 100644 --- a/debian/postinst +++ b/debian/postinst @@ -66,7 +66,7 @@ case "$1" in esac # Min size of password -yd_update_keyval "$CONF_FILE" "minlen" "12" +yd_update_keyval "$CONF_FILE" "minlen" "10" # Lowercase char (-1 => min 1 char) yd_update_keyval "$CONF_FILE" "lcredit" "-1"