|
Lines 307-313
check_service_files_ownership() {
Link Here
|
| 307 |
|
307 |
|
| 308 |
if [ -z "${run_service_as}" ] |
308 |
if [ -z "${run_service_as}" ] |
| 309 |
then |
309 |
then |
| 310 |
accnt_name=$(/usr/bin/cygrunsrv -VQ sshd | |
310 |
accnt_name=$(/usr/bin/cygrunsrv -VQ "${service_name}" | |
| 311 |
/usr/bin/sed -ne 's/^Account *: *//gp') |
311 |
/usr/bin/sed -ne 's/^Account *: *//gp') |
| 312 |
if [ "${accnt_name}" = "LocalSystem" ] |
312 |
if [ "${accnt_name}" = "LocalSystem" ] |
| 313 |
then |
313 |
then |
|
Lines 329-337
check_service_files_ownership() {
Link Here
|
| 329 |
fi |
329 |
fi |
| 330 |
if [ -z "${run_service_as}" ] |
330 |
if [ -z "${run_service_as}" ] |
| 331 |
then |
331 |
then |
| 332 |
csih_warning "Couldn't determine name of user running sshd service from account database!" |
332 |
csih_warning "Couldn't determine name of user running ${service_name} service from account database!" |
| 333 |
csih_warning "As a result, this script cannot make sure that the files used" |
333 |
csih_warning "As a result, this script cannot make sure that the files used" |
| 334 |
csih_warning "by the sshd service belong to the user running the service." |
334 |
csih_warning "by the ${service_name} service belong to the user running the service." |
| 335 |
return 1 |
335 |
return 1 |
| 336 |
fi |
336 |
fi |
| 337 |
fi |
337 |
fi |
|
Lines 367-374
check_service_files_ownership() {
Link Here
|
| 367 |
if [ $ret -ne 0 ] |
367 |
if [ $ret -ne 0 ] |
| 368 |
then |
368 |
then |
| 369 |
csih_warning "Couldn't change owner of important files to ${run_service_as}!" |
369 |
csih_warning "Couldn't change owner of important files to ${run_service_as}!" |
| 370 |
csih_warning "This may cause the sshd service to fail! Please make sure that" |
370 |
csih_warning "This may cause the ${service_name} service to fail! Please make sure that" |
| 371 |
csih_warning "you have suufficient permissions to change the ownership of files" |
371 |
csih_warning "you have sufficient permissions to change the ownership of files" |
| 372 |
csih_warning "and try to run the ssh-host-config script again." |
372 |
csih_warning "and try to run the ssh-host-config script again." |
| 373 |
fi |
373 |
fi |
| 374 |
return $ret |
374 |
return $ret |
|
Lines 446-452
install_service() {
Link Here
|
| 446 |
echo |
446 |
echo |
| 447 |
csih_inform "The sshd service has been installed under the LocalSystem" |
447 |
csih_inform "The sshd service has been installed under the LocalSystem" |
| 448 |
csih_inform "account (also known as SYSTEM). To start the service now, call" |
448 |
csih_inform "account (also known as SYSTEM). To start the service now, call" |
| 449 |
csih_inform "\`net start sshd' or \`cygrunsrv -S sshd'. Otherwise, it" |
449 |
csih_inform "\`net start ${service_name}' or \`cygrunsrv -S ${service_name}'. Otherwise, it" |
| 450 |
csih_inform "will start automatically after the next reboot." |
450 |
csih_inform "will start automatically after the next reboot." |
| 451 |
fi |
451 |
fi |
| 452 |
else |
452 |
else |
| 453 |
- |
|
|