~ubuntu-branches/ubuntu/intrepid/slurm-llnl/intrepid-security

« back to all changes in this revision

Viewing changes to src/slurmctld/trigger_mgr.c

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2009-10-07 06:51:11 UTC
  • Revision ID: james.westby@ubuntu.com-20091007065111-bn4scjyrxifh9ze3
Tags: 1.3.6-1lenny3build0.8.10.1
fake sync from Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
982
982
                setpgrp();
983
983
#endif
984
984
                setsid();
985
 
                setuid(uid);
986
 
                setgid(gid);
987
 
                initgroups(user_name, -1);
 
985
                if (initgroups(user_name, gid) == -1) {
 
986
                        error("trigger: initgroups: %m");
 
987
                        exit(1);
 
988
                }
 
989
                if (setgid(gid) == -1) {
 
990
                        error("trigger: setgid: %m");
 
991
                        exit(1);
 
992
                }
 
993
                if (setuid(uid) == -1) {
 
994
                        error("trigger: setuid: %m");
 
995
                        exit(1);
 
996
                }
988
997
                execl(program, arg0, arg1, NULL);
989
998
                exit(1);
990
999
        } else