Properly pass environment variables to the command line. This fixes a
problem where the root password would also be reported as wrong if, for example, LANG was set in the environment.
This commit is contained in:
parent
fa45acf58d
commit
fc69d4c098
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=116871
4 changed files with 56 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= gnomesystemtools
|
||||
PORTVERSION= 0.91.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-system-tools/0.91
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
--- src/common/gst-auth.c.orig Sat Aug 21 01:01:33 2004
|
||||
+++ src/common/gst-auth.c Sat Aug 21 01:06:24 2004
|
||||
@@ -300,6 +300,7 @@
|
||||
lc_all = getenv ("LC_ALL");
|
||||
lang = getenv ("LANG");
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
if (lc_all)
|
||||
g_string_append_printf (command, "export LC_ALL=\"%s\" && ", lc_all);
|
||||
else if (lc_messages)
|
||||
@@ -308,6 +309,16 @@
|
||||
g_string_append_printf (command, "export LANG=\"%s\" && ", lang);
|
||||
else if (language)
|
||||
g_string_append_printf (command, "export LANGUAGE=\"%s\" && ", language);
|
||||
+#else
|
||||
+ if (lc_all)
|
||||
+ g_string_append_printf (command, "env LC_ALL=\"%s\" ", lc_all);
|
||||
+ else if (lc_messages)
|
||||
+ g_string_append_printf (command, "env LC_MESSAGES=\"%s\" ", lc_messages);
|
||||
+ else if (lang)
|
||||
+ g_string_append_printf (command, "env LANG=\"%s\" ", lang);
|
||||
+ else if (language)
|
||||
+ g_string_append_printf (command, "env LANGUAGE=\"%s\" ", language);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= gnomesystemtools
|
||||
PORTVERSION= 0.91.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-system-tools/0.91
|
||||
|
|
27
sysutils/gnomesystemtools/files/patch-src_common_gst-auth.c
Normal file
27
sysutils/gnomesystemtools/files/patch-src_common_gst-auth.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- src/common/gst-auth.c.orig Sat Aug 21 01:01:33 2004
|
||||
+++ src/common/gst-auth.c Sat Aug 21 01:06:24 2004
|
||||
@@ -300,6 +300,7 @@
|
||||
lc_all = getenv ("LC_ALL");
|
||||
lang = getenv ("LANG");
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
if (lc_all)
|
||||
g_string_append_printf (command, "export LC_ALL=\"%s\" && ", lc_all);
|
||||
else if (lc_messages)
|
||||
@@ -308,6 +309,16 @@
|
||||
g_string_append_printf (command, "export LANG=\"%s\" && ", lang);
|
||||
else if (language)
|
||||
g_string_append_printf (command, "export LANGUAGE=\"%s\" && ", language);
|
||||
+#else
|
||||
+ if (lc_all)
|
||||
+ g_string_append_printf (command, "env LC_ALL=\"%s\" ", lc_all);
|
||||
+ else if (lc_messages)
|
||||
+ g_string_append_printf (command, "env LC_MESSAGES=\"%s\" ", lc_messages);
|
||||
+ else if (lang)
|
||||
+ g_string_append_printf (command, "env LANG=\"%s\" ", lang);
|
||||
+ else if (language)
|
||||
+ g_string_append_printf (command, "env LANGUAGE=\"%s\" ", language);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
Loading…
Reference in a new issue