Fixes so "make allnoconfig" works again.
[oweals/busybox.git] / libbb / setup_environment.c
index 30d317cea0f3fee156e3176a2dfc3b4fb0ca9b73..aeb285a53f135f470342508d096670e3a63adb00 100644 (file)
 static void xsetenv ( const char *key, const char *value )
 {
            if ( setenv ( key, value, 1 ))
-                               bb_error_msg_and_die ( "out of memory" );
+                               bb_error_msg_and_die (bb_msg_memory_exhausted);
 }
 
 void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw )
 {
        if ( loginshell ) {
-               char *term;
-       
+               const char *term;
+
                /* Change the current working directory to be the home directory
                 * of the user.  It is a fatal error for this process to be unable
                 * to change to that directory.  There is no "default" home
                 * directory.
                 * Some systems default to HOME=/
-                */              
+                */             
                if ( chdir ( pw-> pw_dir )) {
                        if ( chdir ( "/" )) {
                                syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name );