Mercurial > pkg
comparison src/pkg.pl @ 9:a0c0ccd22ca5
progress on setuid wrapper script.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 09 Jan 2013 04:53:59 +0000 |
parents | 7b9d471fc1d3 |
children | e056798af879 |
comparison
equal
deleted
inserted
replaced
8:7b9d471fc1d3 | 9:a0c0ccd22ca5 |
---|---|
67 @pkg_create_group_cmd = | 67 @pkg_create_group_cmd = |
68 ("groupadd", "--force", $pkg_name); | 68 ("groupadd", "--force", $pkg_name); |
69 | 69 |
70 @pkg_create_home_cmd = | 70 @pkg_create_home_cmd = |
71 ("install", "-d", "-g", $pkg_name, "-o", $pkg_name, | 71 ("install", "-d", "-g", $pkg_name, "-o", $pkg_name, |
72 "-m", "700", $pkg_home); | 72 "-m", "755", $pkg_home); |
73 | 73 |
74 @pkg_add_install_cmd = | 74 @pkg_add_install_cmd = |
75 ("gpasswd", "--add", $pkg_name, "install"); | 75 ("gpasswd", "--add", $pkg_name, "install"); |
76 | 76 |
77 sub execute{print "\t@_\n"; system(@_) and die $!;} | 77 sub execute{print "\t@_\n"; system(@_) and die $!;} |
80 @pkg_link_bashrc_cmd = | 80 @pkg_link_bashrc_cmd = |
81 ("install", "-g", $pkg_name, "-o", $pkg_name, | 81 ("install", "-g", $pkg_name, "-o", $pkg_name, |
82 "/pkg/defaults/.profile", "$pkg_home/.profile"); | 82 "/pkg/defaults/.profile", "$pkg_home/.profile"); |
83 | 83 |
84 @pkg_copy_hg_wrapper_cmd = | 84 @pkg_copy_hg_wrapper_cmd = |
85 (install, "-g", "hg-commit", "-o", "hg-commit", | 85 (install, "-g", "users", "-o", "r", |
86 "-m", "4711", "/pkg/defaults/.hg-wrapper", $pkg_home); | 86 "-m", "4777", "/pkg/defaults/.hg-wrapper", $pkg_home); |
87 | 87 |
88 #determine if the user already exists: | 88 #determine if the user already exists: |
89 `id $pkg_name 2>/dev/null`; | 89 `id $pkg_name 2>/dev/null`; |
90 if (!$?){ | 90 if (!$?){ |
91 print "Change user.\n"; | 91 print "Change user.\n"; |