Skip to content

Commit

Permalink
Merge pull request #1496 from DrDaveD/allow-user-home-without-default…
Browse files Browse the repository at this point in the history
…-home

allow --home to still work with "mount home = no"
  • Loading branch information
GodloveD authored May 22, 2018
2 parents dc3daa2 + 6905f85 commit b9acc68
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/runtime/mounts/home/home.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ int _singularity_runtime_mount_home(void) {
char *container_dir = CONTAINER_FINALDIR;


if ( singularity_config_get_bool(MOUNT_HOME) <= 0 ) {
singularity_message(VERBOSE, "Skipping home dir mounting (per config)\n");
return(0);
}

singularity_message(DEBUG, "Checking that home directry is configured: %s\n", home_dest);
if ( home_dest == NULL ) {
singularity_message(ERROR, "Could not obtain user's home directory\n");
Expand All @@ -68,8 +63,12 @@ int _singularity_runtime_mount_home(void) {
singularity_message(ERROR, "Not mounting user requested home: User bind control is disallowed\n");
ABORT(255);
}
} else if ( singularity_config_get_bool(MOUNT_HOME) <= 0 ) {
singularity_message(VERBOSE, "Skipping home dir mounting (per config)\n");
return(0);
}


singularity_message(DEBUG, "Checking ownership of home directory source: %s\n", home_source);
if ( is_owner(home_source, singularity_priv_getuid()) != 0 ) {
singularity_message(ERROR, "Home directory is not owned by calling user: %s\n", home_source);
Expand Down

0 comments on commit b9acc68

Please sign in to comment.