- From f45d343b6d2dec795eee6ad76bcd2b04cb8648aa Mon Sep 17 00:00:00 2001
- From: Cedric Blancher <cedric.blancher@gmail.com>
- Date: Fri, 20 Sep 2024 19:41:06 +0200
- Subject: [PATCH 1/3] cygwin_idmapper.ksh: Add idmapper support for French
- Windows
- Add idmapper support for French Windows, i.e. for localised
- Windows system account names in French.
- Signed-off-by: Roland Mainz <roland.mainz@nrubsig.org>
- ---
- cygwin_idmapper.ksh | 70 ++++++++++++++++++++++++++++++++++++++-------
- 1 file changed, 60 insertions(+), 10 deletions(-)
- diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
- index 930a32e..7e51817 100644
- --- a/cygwin_idmapper.ksh
- +++ b/cygwin_idmapper.ksh
- @@ -5,6 +5,8 @@ typeset IFS=''
- export PATH='/bin:/usr/bin'
- +export LC_ALL='en_US.UTF-8'
- +
- #
- # global variables for this script
- # (stored in compound variable so we
- @@ -35,23 +37,39 @@ compound c=(
- #
- typeset stdout
- -# Group "SYSTEM": de_DE: "SYSTEM" ...
- +typeset -A localised_usernames
- +typeset -A localised_groupnames
- +
- +# User "SYSTEM": de_DE: "SYSTEM" ...
- stdout="$(getent passwd 'S-1-5-18')"
- -typeset -r -A localised_usernames=(['SYSTEM']="${stdout%%:*}")
- +localised_usernames['SYSTEM']="${stdout%%:*}"
- -# Group "None": de_DE: "Kein" ...
- +# User "Adminstrator": fr_FR: "Administrateur" ...
- +stdout="$(getent passwd 'S-1-5-21-3286904461-661230000-4220857270-500')"
- +localised_usernames['Administrator']="${stdout%%:*}"
- +
- +# Group "None": de_DE: "Kein", fr_FR: "Aucun" ...
- stdout="$(getent group 'S-1-5-21-3286904461-661230000-4220857270-513')"
- -typeset -r -A localised_groupnames=(['None']="${stdout%%:*}")
- +localised_groupnames['None']="${stdout%%:*}"
- compound -A localusers=(
- - ["roland_mainz"]=(
- - localaccountname='roland_mainz'
- - localuid=197608
- + #
- + # System accounts
- + #
- + ["${localised_usernames['Administrator']}"]=(
- + localaccountname="${localised_usernames['Administrator']}"
- + localuid=197108
- localgid=197121
- )
- - ["siegfried_wulsch"]=(
- - localaccountname='siegfried_wulsch'
- - localuid=197609
- + ['Administrator']=(
- + localaccountname="${localised_usernames['Administrator']}"
- + localuid=197108
- + localgid=197121
- + )
- + # French user "Administrator"
- + ['Administrateur']=(
- + localaccountname="${localised_usernames['Administrator']}"
- + localuid=197108
- localgid=197121
- )
- ["${localised_usernames['SYSTEM']}"]=(
- @@ -64,6 +82,27 @@ compound -A localusers=(
- localuid=18
- localgid=18
- )
- + # French user "SYSTEM"
- + # FIXME: This should be $'Syst\u[e8]me', but ksh93 1.0.10
- + # doesn't work
- + [$'Syst\xc3\xa8me']=(
- + localaccountname="${localised_usernames['SYSTEM']}"
- + localuid=18
- + localgid=18
- + )
- + #
- + # Site-specific users
- + #
- + ["roland_mainz"]=(
- + localaccountname='roland_mainz'
- + localuid=197608
- + localgid=197121
- + )
- + ["siegfried_wulsch"]=(
- + localaccountname='siegfried_wulsch'
- + localuid=197609
- + localgid=197121
- + )
- ["rmainz"]=(
- localaccountname='rmainz'
- localuid=1616
- @@ -87,6 +126,9 @@ compound -A localusers=(
- )
- compound -A localgroups=(
- + #
- + # System accounts
- + #
- ["${localised_groupnames['None']}"]=(
- localgroupname="${localised_groupnames['None']}"
- localgid=197121
- @@ -95,11 +137,19 @@ compound -A localgroups=(
- localgroupname="${localised_groupnames['None']}"
- localgid=197121
- )
- + # French Windows localised group name for "None"
- + ['Aucun']=(
- + localgroupname="${localised_groupnames['None']}"
- + localgid=197121
- + )
- # German Windows localised group name for "None"
- ["Kein"]=(
- localgroupname="${localised_groupnames['None']}"
- localgid=197121
- )
- + #
- + # Site-specific users
- + #
- ["rmainz"]=(
- localgroupname='rmainz'
- localgid=1616
- --
- 2.45.1
- From e509c605f164018a1f9bdf80d9ff979ce353c11b Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Fri, 20 Sep 2024 19:45:43 +0200
- Subject: [PATCH 2/3] cygwin_idmapper.ksh: Improve idmapper debugging support
- Improve idmapper debugging support
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin_idmapper.ksh | 36 ++++++++++++++++++------------------
- 1 file changed, 18 insertions(+), 18 deletions(-)
- diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
- index 7e51817..324843c 100644
- --- a/cygwin_idmapper.ksh
- +++ b/cygwin_idmapper.ksh
- @@ -37,48 +37,48 @@ compound c=(
- #
- typeset stdout
- -typeset -A localised_usernames
- -typeset -A localised_groupnames
- +typeset -A c.localised_usernames
- +typeset -A c.localised_groupnames
- # User "SYSTEM": de_DE: "SYSTEM" ...
- stdout="$(getent passwd 'S-1-5-18')"
- -localised_usernames['SYSTEM']="${stdout%%:*}"
- +c.localised_usernames['SYSTEM']="${stdout%%:*}"
- # User "Adminstrator": fr_FR: "Administrateur" ...
- stdout="$(getent passwd 'S-1-5-21-3286904461-661230000-4220857270-500')"
- -localised_usernames['Administrator']="${stdout%%:*}"
- +c.localised_usernames['Administrator']="${stdout%%:*}"
- # Group "None": de_DE: "Kein", fr_FR: "Aucun" ...
- stdout="$(getent group 'S-1-5-21-3286904461-661230000-4220857270-513')"
- -localised_groupnames['None']="${stdout%%:*}"
- +c.localised_groupnames['None']="${stdout%%:*}"
- compound -A localusers=(
- #
- # System accounts
- #
- - ["${localised_usernames['Administrator']}"]=(
- - localaccountname="${localised_usernames['Administrator']}"
- + ["${c.localised_usernames['Administrator']}"]=(
- + localaccountname="${c.localised_usernames['Administrator']}"
- localuid=197108
- localgid=197121
- )
- ['Administrator']=(
- - localaccountname="${localised_usernames['Administrator']}"
- + localaccountname="${c.localised_usernames['Administrator']}"
- localuid=197108
- localgid=197121
- )
- # French user "Administrator"
- ['Administrateur']=(
- - localaccountname="${localised_usernames['Administrator']}"
- + localaccountname="${c.localised_usernames['Administrator']}"
- localuid=197108
- localgid=197121
- )
- - ["${localised_usernames['SYSTEM']}"]=(
- - localaccountname="${localised_usernames['SYSTEM']}"
- + ["${c.localised_usernames['SYSTEM']}"]=(
- + localaccountname="${c.localised_usernames['SYSTEM']}"
- localuid=18
- localgid=18
- )
- ["SYSTEM"]=(
- - localaccountname="${localised_usernames['SYSTEM']}"
- + localaccountname="${c.localised_usernames['SYSTEM']}"
- localuid=18
- localgid=18
- )
- @@ -86,7 +86,7 @@ compound -A localusers=(
- # FIXME: This should be $'Syst\u[e8]me', but ksh93 1.0.10
- # doesn't work
- [$'Syst\xc3\xa8me']=(
- - localaccountname="${localised_usernames['SYSTEM']}"
- + localaccountname="${c.localised_usernames['SYSTEM']}"
- localuid=18
- localgid=18
- )
- @@ -129,22 +129,22 @@ compound -A localgroups=(
- #
- # System accounts
- #
- - ["${localised_groupnames['None']}"]=(
- - localgroupname="${localised_groupnames['None']}"
- + ["${c.localised_groupnames['None']}"]=(
- + localgroupname="${c.localised_groupnames['None']}"
- localgid=197121
- )
- ["None"]=(
- - localgroupname="${localised_groupnames['None']}"
- + localgroupname="${c.localised_groupnames['None']}"
- localgid=197121
- )
- # French Windows localised group name for "None"
- ['Aucun']=(
- - localgroupname="${localised_groupnames['None']}"
- + localgroupname="${c.localised_groupnames['None']}"
- localgid=197121
- )
- # German Windows localised group name for "None"
- ["Kein"]=(
- - localgroupname="${localised_groupnames['None']}"
- + localgroupname="${c.localised_groupnames['None']}"
- localgid=197121
- )
- #
- --
- 2.45.1
- From 762c7b1d654385a49b97d0c9b29d55f7a6b4d44a Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Fri, 20 Sep 2024 19:51:10 +0200
- Subject: [PATCH 3/3] cygwin_idmapper.ksh: Fix error handling for unknown modes
- Fix error handling for unknown modes.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin_idmapper.ksh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
- diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
- index 324843c..ab38245 100644
- --- a/cygwin_idmapper.ksh
- +++ b/cygwin_idmapper.ksh
- @@ -14,7 +14,7 @@ export LC_ALL='en_US.UTF-8'
- #
- compound c=(
- mode="$1"
- - name="$2"
- + name="${2-}"
- )
- #
- @@ -248,7 +248,7 @@ case "${c.mode}" in
- exit 1
- ;;
- *)
- - print -u2 "cygwin_idmapper.ksh: Unknown mode %q." "${c.mode}"
- + print -u2 -f "cygwin_idmapper.ksh: Unknown mode %q.\n" "${c.mode}"
- exit 1
- ;;
- esac
- --
- 2.45.1
msnfs41client: Add support for French Windows in the idmapper+misc, 2024-09-20
Posted by Anonymous on Fri 20th Sep 2024 19:04
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.