File README changed (mode: 100644) (index 436de0b..8552860) |
56 |
56 |
# setsebool -P httpd_can_network_memcache on |
# setsebool -P httpd_can_network_memcache on |
57 |
57 |
# setsebool -P httpd_can_sendmail on |
# setsebool -P httpd_can_sendmail on |
58 |
58 |
|
|
59 |
|
. Edit firewall to permit port git, http and https |
|
|
59 |
|
. Edit firewall to permit port ssh, git, http and https |
File inc/keys.inc.php changed (mode: 100644) (index d3f2811..c47dedb) |
... |
... |
function rg_keys_regen($db) |
158 |
158 |
} |
} |
159 |
159 |
while (($row = rg_sql_fetch_array($res))) { |
while (($row = rg_sql_fetch_array($res))) { |
160 |
160 |
rg_log("Writing key [" . $row['key'] . "] for uid " . $row['uid']); |
rg_log("Writing key [" . $row['key'] . "] for uid " . $row['uid']); |
161 |
|
$buf = "command=\"/usr/bin/php " . $rg_scripts . "/remote.php" |
|
|
161 |
|
$buf = "command=\"/usr/bin/php " . $rg_scripts . "/scripts/remote.php" |
162 |
162 |
. " " . $row['uid'] . "\"" |
. " " . $row['uid'] . "\"" |
163 |
163 |
. "," . $rg_ssh_paras |
. "," . $rg_ssh_paras |
164 |
164 |
. " " . $row['key'] . "\n"; |
. " " . $row['key'] . "\n"; |
File inc/repo.inc.php changed (mode: 100644) (index 20d39e9..fbd06b8) |
... |
... |
function rg_repo_allow($db, $ri, $rg_ui, $needed_rights) |
150 |
150 |
} else { |
} else { |
151 |
151 |
$rr = rg_repo_rights_get($db, $ri, $rg_ui['uid'], 0); |
$rr = rg_repo_rights_get($db, $ri, $rg_ui['uid'], 0); |
152 |
152 |
if ($rr['ok'] != 1) { |
if ($rr['ok'] != 1) { |
153 |
|
rg_repo_set_error("No access!"); |
|
|
153 |
|
rg_repo_set_error("Cannot get rights!"); |
154 |
154 |
return FALSE; |
return FALSE; |
155 |
155 |
} |
} |
156 |
156 |
$db_rights = $rr['rights']; |
$db_rights = $rr['rights']; |
|
... |
... |
function rg_repo_rights_get($db, $ri, $uid, $flags) |
485 |
485 |
|
|
486 |
486 |
$ret['rights'] = rg_rights_combine($dr, $r['rights']); |
$ret['rights'] = rg_rights_combine($dr, $r['rights']); |
487 |
487 |
rg_log("\tFinal rights($dr + " . $r['rights'] . ")=" . $ret['rights']); |
rg_log("\tFinal rights($dr + " . $r['rights'] . ")=" . $ret['rights']); |
|
488 |
|
$ret['ok'] = 1; |
488 |
489 |
|
|
489 |
490 |
return $ret; |
return $ret; |
490 |
491 |
} |
} |
File inc/rights.inc.php changed (mode: 100644) (index 9d20553..d102dba) |
... |
... |
function rg_rights_get($db, $type, $obj_id, $uid) |
164 |
164 |
|
|
165 |
165 |
$ret['ok'] = 1; |
$ret['ok'] = 1; |
166 |
166 |
$ret['exists'] = 0; |
$ret['exists'] = 0; |
167 |
|
$row = rg_sql_fetch_array($res); |
|
|
167 |
|
$rows = rg_sql_num_rows($res); |
|
168 |
|
if ($rows > 0) |
|
169 |
|
$row = rg_sql_fetch_array($res); |
168 |
170 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
169 |
|
if (isset($row['rights'])) { |
|
|
171 |
|
if ($rows > 0) { |
170 |
172 |
$ret['rights'] = $row['rights']; |
$ret['rights'] = $row['rights']; |
171 |
173 |
$ret['exists'] = 1; |
$ret['exists'] = 1; |
172 |
174 |
} |
} |
173 |
175 |
|
|
174 |
|
rg_log("\tRights: " . $ret['rights']); |
|
|
176 |
|
rg_log("\tdb rights: " . $ret['rights'] . "."); |
175 |
177 |
|
|
176 |
178 |
return $ret; |
return $ret; |
177 |
179 |
} |
} |
File rocketgit.spec.in changed (mode: 100644) (index df7e6d9..972c810) |
... |
... |
Light and fast Git hosting solution, similar with Gitorious/GitHub/etc. |
17 |
17 |
|
|
18 |
18 |
%pre |
%pre |
19 |
19 |
getent group rocketgit || groupadd -r rocketgit |
getent group rocketgit || groupadd -r rocketgit |
20 |
|
getent passwd rocketgit || useradd -r -g rocketgit -s /sbin/nologin -m -d /home/rocketgit -c "RocketGit user" rocketgit |
|
|
20 |
|
getent passwd rocketgit || useradd -r -g rocketgit -s /bin/bash -m -d /home/rocketgit -c "RocketGit user" rocketgit |
21 |
21 |
semanage fcontext -a -t httpd_log_t "/var/log/rocketgit-web(/.*)?" || : |
semanage fcontext -a -t httpd_log_t "/var/log/rocketgit-web(/.*)?" || : |
22 |
22 |
|
|
23 |
23 |
%post |
%post |
File tests/keys.php changed (mode: 100644) (index cda4317..3ed68e7) |
... |
... |
if ($c === FALSE) { |
56 |
56 |
echo "Cannot regenerate file: " . rg_keys_error() . "!\n"; |
echo "Cannot regenerate file: " . rg_keys_error() . "!\n"; |
57 |
57 |
exit(1); |
exit(1); |
58 |
58 |
} |
} |
59 |
|
$e = "command=\"/usr/bin/php " . $rg_scripts . "/remote.php 1\"," . $rg_ssh_paras . " aaa 'bbb' first_key\n" |
|
60 |
|
. "command=\"/usr/bin/php " . $rg_scripts . "/remote.php 2\"," . $rg_ssh_paras . " aaa 'bbb' second_key\n"; |
|
|
59 |
|
$e = "command=\"/usr/bin/php " . $rg_scripts . "/scripts/remote.php 1\"," . $rg_ssh_paras . " aaa 'bbb' first_key\n" |
|
60 |
|
. "command=\"/usr/bin/php " . $rg_scripts . "/scripts/remote.php 2\"," . $rg_ssh_paras . " aaa 'bbb' second_key\n"; |
61 |
61 |
if (strcmp($c, $e) != 0) { |
if (strcmp($c, $e) != 0) { |
62 |
62 |
echo "Generated file does not seems OK\n"; |
echo "Generated file does not seems OK\n"; |
63 |
63 |
exit(1); |
exit(1); |