import sbms import os import grp # get env object and clone it Import('*') env = env.Clone() env.AppendUnique(CPPFLAGS=['-std=c++11']) sbms.executable(env) #------------------------------------------- # The following is used to set the setuid # bit and group id on the binaries after installation # Full paths to final installed targets installdir = "#%s" % (osname) ginstalldir = "#../../%s" % (osname) target = installdir + '/bin/run_as_user' gtarget = ginstalldir + '/bin/run_as_user' # Must change gid first since setting setuid resets the gid # We also have to do this via external shell command since # scons does not provide a Chgrp like it does a Chmod #env.AddPostAction( target ,'chgrp halld-1 $TARGET') #env.AddPostAction(gtarget ,'chgrp halld-1 $TARGET') # Finally, set the setuid bit env.AddPostAction(target , Chmod('$TARGET', 06775)) env.AddPostAction(gtarget, Chmod('$TARGET', 06775))