355 |
/* FIXME: Shouldn't this check be much more closely related to the |
/* FIXME: Shouldn't this check be much more closely related to the |
356 |
readonly user stuff (CVSROOT/readers, &c). That is, why should |
readonly user stuff (CVSROOT/readers, &c). That is, why should |
357 |
root be able to "cvs init", "cvs import", &c, but not "cvs ci"? */ |
root be able to "cvs init", "cvs import", &c, but not "cvs ci"? */ |
358 |
if (geteuid () == (uid_t) 0 |
/* Who we are on the client side doesn't affect logging. */ |
359 |
# ifdef CLIENT_SUPPORT |
if (geteuid () == (uid_t) 0 && !current_parsed_root->isremote) |
|
/* Who we are on the client side doesn't affect logging. */ |
|
|
&& !current_parsed_root->isremote |
|
|
# endif |
|
|
) |
|
360 |
{ |
{ |
361 |
struct passwd *pw; |
struct passwd *pw; |
362 |
|
|
697 |
dellist (&mulist); |
dellist (&mulist); |
698 |
|
|
699 |
/* see if we need to sleep before returning to avoid time-stamp races */ |
/* see if we need to sleep before returning to avoid time-stamp races */ |
700 |
if ( |
if (!server_active && last_register_time) |
701 |
#ifdef SERVER_SUPPORT |
{ |
702 |
/* But only sleep on the client. */ |
sleep_past (last_register_time); |
703 |
!server_active && |
} |
|
#endif |
|
|
last_register_time |
|
|
) |
|
|
sleep_past (last_register_time); |
|
704 |
|
|
705 |
return err; |
return err; |
706 |
} |
} |
1375 |
if (!got_message) |
if (!got_message) |
1376 |
{ |
{ |
1377 |
got_message = 1; |
got_message = 1; |
1378 |
if ( |
if (!server_active && use_editor) |
|
#ifdef SERVER_SUPPORT |
|
|
!server_active && |
|
|
#endif |
|
|
use_editor) |
|
1379 |
do_editor (finfo->update_dir, &saved_message, |
do_editor (finfo->update_dir, &saved_message, |
1380 |
finfo->repository, ulist); |
finfo->repository, ulist); |
1381 |
do_verify (&saved_message, finfo->repository, ulist); |
do_verify (&saved_message, finfo->repository, ulist); |
1659 |
/* get commit message */ |
/* get commit message */ |
1660 |
got_message = 1; |
got_message = 1; |
1661 |
real_repos = Name_Repository (dir, update_dir); |
real_repos = Name_Repository (dir, update_dir); |
1662 |
if ( |
if (!server_active && use_editor) |
|
#ifdef SERVER_SUPPORT |
|
|
!server_active && |
|
|
#endif |
|
|
use_editor) |
|
1663 |
do_editor (update_dir, &saved_message, real_repos, ulist); |
do_editor (update_dir, &saved_message, real_repos, ulist); |
1664 |
do_verify (&saved_message, real_repos, ulist); |
do_verify (&saved_message, real_repos, ulist); |
1665 |
free (real_repos); |
free (real_repos); |
2135 |
/* and lock it */ |
/* and lock it */ |
2136 |
if (lock_RCS (file, rcs, rev, repository)) |
if (lock_RCS (file, rcs, rev, repository)) |
2137 |
{ |
{ |
2138 |
error (0, 0, "cannot lock `%s'.", rcs->path); |
error (0, 0, "cannot lock revision %s in `%s'.", |
2139 |
|
rev ? rev : tag ? tag : "HEAD", rcs->path); |
2140 |
if (rev != NULL) |
if (rev != NULL) |
2141 |
free (rev); |
free (rev); |
2142 |
goto out; |
goto out; |
2199 |
/* and lock it once again. */ |
/* and lock it once again. */ |
2200 |
if (lock_RCS (file, rcs, NULL, repository)) |
if (lock_RCS (file, rcs, NULL, repository)) |
2201 |
{ |
{ |
2202 |
error (0, 0, "cannot lock `%s'.", rcs->path); |
error (0, 0, "cannot lock initial revision in `%s'.", |
2203 |
|
rcs->path); |
2204 |
goto out; |
goto out; |
2205 |
} |
} |
2206 |
} |
} |
2308 |
/* lock the branch. (stubbed branches need not be locked.) */ |
/* lock the branch. (stubbed branches need not be locked.) */ |
2309 |
if (lock_RCS (file, rcs, NULL, repository)) |
if (lock_RCS (file, rcs, NULL, repository)) |
2310 |
{ |
{ |
2311 |
error (0, 0, "cannot lock `%s'.", rcs->path); |
error (0, 0, "cannot lock head revision in `%s'.", rcs->path); |
2312 |
goto out; |
goto out; |
2313 |
} |
} |
2314 |
} |
} |