Updated patch. Need check in two places.
--- nsalibsemanage/src/genhomedircon.c 2008-08-28 09:34:24.000000000 -0400 +++ libsemanage-2.0.37/src/genhomedircon.c 2009-09-16 13:25:43.000000000 -0400 @@ -304,6 +304,10 @@ continue; if (!semanage_list_find(shells, pwbuf->pw_shell)) continue; + int len = strlen(pwbuf->pw_dir) -1; + for(; len > 0 && pwbuf->pw_dir[len] == '/'; len--) { + pwbuf->pw_dir[len] = '\0'; + } if (strcmp(pwbuf->pw_dir, "/") == 0) continue; if (semanage_str_count(pwbuf->pw_dir, '/') <= 1) @@ -788,6 +792,11 @@ continue; } + int len = strlen(pwent->pw_dir) -1; + for(; len > 0 && pwent->pw_dir[len] == '/'; len--) { + pwent->pw_dir[len] = '\0'; + } + if (strcmp(pwent->pw_dir, "/") == 0) { /* don't relabel / genhomdircon checked to see if root * was the user and if so, set his home directory to