Author: tgoettlicher Date: Mon Nov 19 15:22:28 2007 New Revision: 7864 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7864&view=rev Log: preserve lang in zypp-checkpatches-wrapper Modified: trunk/zypper/src/zypp-checkpatches-wrapper.c Modified: trunk/zypper/src/zypp-checkpatches-wrapper.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypp-checkpatches-wrapper.c?rev=7864&r1=7863&r2=7864&view=diff ============================================================================== --- trunk/zypper/src/zypp-checkpatches-wrapper.c (original) +++ trunk/zypper/src/zypp-checkpatches-wrapper.c Mon Nov 19 15:22:28 2007 @@ -20,6 +20,8 @@ const char *arg3 = "-q"; const char *arg4 = "xu"; +char *lang = NULL; + int main (void) { /* see http://rechner.lst.de/~okir/blackhats/node41.html */ @@ -43,12 +45,18 @@ perror ("chdir"); return WRAPPER_ERROR; } + + /* save language */ + lang = getenv("LANG"); + /* do not look at argv... done */ /* clear environment */ if (clearenv ()) { fprintf (stderr, "clearenv failed\n"); return WRAPPER_ERROR; } + + /* set minimal environment... done */ /* prevent the user from sending signals */ @@ -72,6 +80,10 @@ umask(0022); + /* set language */ + if (lang != NULL) + setenv("LANG", lang, 1); + /* execute the real application */ execl (app, app, arg1, arg2, arg3, arg4, (char *) NULL); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org