Skip to content

Commit

Permalink
Fix gitignore and add prepare.go
Browse files Browse the repository at this point in the history
  • Loading branch information
cclerget committed Jul 5, 2018
1 parent d148e67 commit 1c2205d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ singularity-*.tar.gz
*.m4
*.pyc
*.swp
singularity
generate_docs

.vscode
Expand Down
20 changes: 20 additions & 0 deletions src/runtime/engines/singularity/prepare.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2018, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.

package singularity

import (
"fmt"
)

// PrepareConfig checks and prepares the runtime engine config
func (engine *EngineOperations) PrepareConfig() error {
if engine.CommonConfig.EngineName != Name {
return fmt.Errorf("incorrect engine")
}

engine.CommonConfig.OciConfig.SetProcessNoNewPrivileges(true)
return nil
}

0 comments on commit 1c2205d

Please sign in to comment.