version 1.280, 2008/09/12 13:24:24 |
version 1.281, 2008/09/17 06:47:57 |
|
|
struct passwd *pw; |
struct passwd *pw; |
struct rcs_branch *brp, *obrp; |
struct rcs_branch *brp, *obrp; |
struct rcs_delta *ordp, *rdp; |
struct rcs_delta *ordp, *rdp; |
|
uid_t uid; |
|
|
if (rev == RCS_HEAD_REV) { |
if (rev == RCS_HEAD_REV) { |
if (rf->rf_flags & RCS_CREATE) { |
if (rf->rf_flags & RCS_CREATE) { |
|
|
return (-1); |
return (-1); |
} |
} |
|
|
if ((pw = getpwuid(getuid())) == NULL) |
uid = getuid(); |
|
if ((pw = getpwuid(uid)) == NULL) |
fatal("getpwuid failed"); |
fatal("getpwuid failed"); |
|
|
rdp = xcalloc(1, sizeof(*rdp)); |
rdp = xcalloc(1, sizeof(*rdp)); |
|
|
|
|
rdp->rd_next = rcsnum_alloc(); |
rdp->rd_next = rcsnum_alloc(); |
|
|
if (username == NULL) |
if (uid == 0) |
|
username = getlogin(); |
|
if (username == NULL || *username == '\0') |
username = pw->pw_name; |
username = pw->pw_name; |
|
|
rdp->rd_author = xstrdup(username); |
rdp->rd_author = xstrdup(username); |