| @@ -128,26 +128,29 @@ static const struct cmd | | | @@ -128,26 +128,29 @@ static const struct cmd |
128 | habits will expect a certain abbreviation to be unique, and in | | 128 | habits will expect a certain abbreviation to be unique, and in |
129 | a future release of CVS it may not be. So it is better to | | 129 | a future release of CVS it may not be. So it is better to |
130 | accept only an explicit list of abbreviations and plan on | | 130 | accept only an explicit list of abbreviations and plan on |
131 | supporting them in the future as well as now. */ | | 131 | supporting them in the future as well as now. */ |
132 | | | 132 | |
133 | const char *nick1; | | 133 | const char *nick1; |
134 | const char *nick2; | | 134 | const char *nick2; |
135 | | | 135 | |
136 | int (*func) (int, char **); /* Function takes (argc, argv) arguments. */ | | 136 | int (*func) (int, char **); /* Function takes (argc, argv) arguments. */ |
137 | unsigned long attr; /* Attributes. */ | | 137 | unsigned long attr; /* Attributes. */ |
138 | } cmds[] = | | 138 | } cmds[] = |
139 | | | 139 | |
140 | { | | 140 | { |
| | | 141 | /* cvsacl patch */ |
| | | 142 | { "acl", NULL, NULL, cvsacl, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, |
| | | 143 | { "racl", NULL, NULL, cvsacl, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, |
141 | { "add", "ad", "new", add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, | | 144 | { "add", "ad", "new", add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, |
142 | { "admin", "adm", "rcs", admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, | | 145 | { "admin", "adm", "rcs", admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, |
143 | { "annotate", "ann", NULL, annotate, CVS_CMD_USES_WORK_DIR }, | | 146 | { "annotate", "ann", NULL, annotate, CVS_CMD_USES_WORK_DIR }, |
144 | { "checkout", "co", "get", checkout, 0 }, | | 147 | { "checkout", "co", "get", checkout, 0 }, |
145 | { "commit", "ci", "com", commit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, | | 148 | { "commit", "ci", "com", commit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, |
146 | { "diff", "di", "dif", diff, CVS_CMD_USES_WORK_DIR }, | | 149 | { "diff", "di", "dif", diff, CVS_CMD_USES_WORK_DIR }, |
147 | { "edit", NULL, NULL, edit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, | | 150 | { "edit", NULL, NULL, edit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, |
148 | { "editors", NULL, NULL, editors, CVS_CMD_USES_WORK_DIR }, | | 151 | { "editors", NULL, NULL, editors, CVS_CMD_USES_WORK_DIR }, |
149 | { "export", "exp", "ex", checkout, CVS_CMD_USES_WORK_DIR }, | | 152 | { "export", "exp", "ex", checkout, CVS_CMD_USES_WORK_DIR }, |
150 | { "history", "hi", "his", history, CVS_CMD_USES_WORK_DIR }, | | 153 | { "history", "hi", "his", history, CVS_CMD_USES_WORK_DIR }, |
151 | { "import", "im", "imp", import, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR | CVS_CMD_IGNORE_ADMROOT}, | | 154 | { "import", "im", "imp", import, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR | CVS_CMD_IGNORE_ADMROOT}, |
152 | { "init", NULL, NULL, init, CVS_CMD_MODIFIES_REPOSITORY }, | | 155 | { "init", NULL, NULL, init, CVS_CMD_MODIFIES_REPOSITORY }, |
153 | #if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT) | | 156 | #if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT) |
| @@ -221,50 +224,52 @@ static const char *const usg[] = | | | @@ -221,50 +224,52 @@ static const char *const usg[] = |
221 | in one line. I'm not sure one can get more concise than the | | 224 | in one line. I'm not sure one can get more concise than the |
222 | paragraph in ../cvs.spec without assuming the reader knows what | | 225 | paragraph in ../cvs.spec without assuming the reader knows what |
223 | version control means. */ | | 226 | version control means. */ |
224 | | | 227 | |
225 | "For CVS updates and additional information, see\n", | | 228 | "For CVS updates and additional information, see\n", |
226 | " the CVS home page at http://www.nongnu.org/cvs/ or\n", | | 229 | " the CVS home page at http://www.nongnu.org/cvs/ or\n", |
227 | " the CVSNT home page at http://www.cvsnt.org/\n", | | 230 | " the CVSNT home page at http://www.cvsnt.org/\n", |
228 | NULL, | | 231 | NULL, |
229 | }; | | 232 | }; |
230 | | | 233 | |
231 | static const char *const cmd_usage[] = | | 234 | static const char *const cmd_usage[] = |
232 | { | | 235 | { |
233 | "CVS commands are:\n", | | 236 | "CVS commands are:\n", |
| | | 237 | " acl Add/modify/delete ACLs in files and directories\n", |
234 | " add Add a new file/directory to the repository\n", | | 238 | " add Add a new file/directory to the repository\n", |
235 | " admin Administration front end for rcs\n", | | 239 | " admin Administration front end for rcs\n", |
236 | " annotate Show last revision where each line was modified\n", | | 240 | " annotate Show last revision where each line was modified\n", |
237 | " checkout Checkout sources for editing\n", | | 241 | " checkout Checkout sources for editing\n", |
238 | " commit Check files into the repository\n", | | 242 | " commit Check files into the repository\n", |
239 | " diff Show differences between revisions\n", | | 243 | " diff Show differences between revisions\n", |
240 | " edit Get ready to edit a watched file\n", | | 244 | " edit Get ready to edit a watched file\n", |
241 | " editors See who is editing a watched file\n", | | 245 | " editors See who is editing a watched file\n", |
242 | " export Export sources from CVS, similar to checkout\n", | | 246 | " export Export sources from CVS, similar to checkout\n", |
243 | " history Show repository access history\n", | | 247 | " history Show repository access history\n", |
244 | " import Import sources into CVS, using vendor branches\n", | | 248 | " import Import sources into CVS, using vendor branches\n", |
245 | " init Create a CVS repository if it doesn't exist\n", | | 249 | " init Create a CVS repository if it doesn't exist\n", |
246 | #if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT) | | 250 | #if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT) |
247 | " kserver Kerberos server mode\n", | | 251 | " kserver Kerberos server mode\n", |
248 | #endif | | 252 | #endif |
249 | " log Print out history information for files\n", | | 253 | " log Print out history information for files\n", |
250 | #ifdef AUTH_CLIENT_SUPPORT | | 254 | #ifdef AUTH_CLIENT_SUPPORT |
251 | " login Prompt for password for authenticating server\n", | | 255 | " login Prompt for password for authenticating server\n", |
252 | " logout Removes entry in .cvspass for remote repository\n", | | 256 | " logout Removes entry in .cvspass for remote repository\n", |
253 | #endif /* AUTH_CLIENT_SUPPORT */ | | 257 | #endif /* AUTH_CLIENT_SUPPORT */ |
254 | " ls List files available from CVS\n", | | 258 | " ls List files available from CVS\n", |
255 | #if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && defined(SERVER_SUPPORT) | | 259 | #if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && defined(SERVER_SUPPORT) |
256 | " pserver Password server mode\n", | | 260 | " pserver Password server mode\n", |
257 | #endif | | 261 | #endif |
| | | 262 | " racl Add/modify/delete ACLs in files and directories\n", |
258 | " rannotate Show last revision where each line of module was modified\n", | | 263 | " rannotate Show last revision where each line of module was modified\n", |
259 | " rdiff Create 'patch' format diffs between releases\n", | | 264 | " rdiff Create 'patch' format diffs between releases\n", |
260 | " release Indicate that a Module is no longer in use\n", | | 265 | " release Indicate that a Module is no longer in use\n", |
261 | " remove Remove an entry from the repository\n", | | 266 | " remove Remove an entry from the repository\n", |
262 | " rlog Print out history information for a module\n", | | 267 | " rlog Print out history information for a module\n", |
263 | " rls List files in a module\n", | | 268 | " rls List files in a module\n", |
264 | " rtag Add a symbolic tag to a module\n", | | 269 | " rtag Add a symbolic tag to a module\n", |
265 | #ifdef SERVER_SUPPORT | | 270 | #ifdef SERVER_SUPPORT |
266 | " server Server mode\n", | | 271 | " server Server mode\n", |
267 | #endif | | 272 | #endif |
268 | " status Display status information on checked out files\n", | | 273 | " status Display status information on checked out files\n", |
269 | " tag Add a symbolic tag to checked out version of files\n", | | 274 | " tag Add a symbolic tag to checked out version of files\n", |
270 | " unedit Undo an edit command\n", | | 275 | " unedit Undo an edit command\n", |
| @@ -1117,26 +1122,29 @@ cause intermittent sandbox corruption.") | | | @@ -1117,26 +1122,29 @@ cause intermittent sandbox corruption.") |
1117 | if (!server_active && !current_parsed_root->isremote) | | 1122 | if (!server_active && !current_parsed_root->isremote) |
1118 | { | | 1123 | { |
1119 | /* If there was an error parsing the config file, parse_config | | 1124 | /* If there was an error parsing the config file, parse_config |
1120 | already printed an error. We keep going. Why? Because | | 1125 | already printed an error. We keep going. Why? Because |
1121 | if we didn't, then there would be no way to check in a new | | 1126 | if we didn't, then there would be no way to check in a new |
1122 | CVSROOT/config file to fix the broken one! */ | | 1127 | CVSROOT/config file to fix the broken one! */ |
1123 | if (config) free_config (config); | | 1128 | if (config) free_config (config); |
1124 | config = parse_config (current_parsed_root->directory, NULL); | | 1129 | config = parse_config (current_parsed_root->directory, NULL); |
1125 | | | 1130 | |
1126 | /* Can set TMPDIR in the environment if necessary now, since | | 1131 | /* Can set TMPDIR in the environment if necessary now, since |
1127 | * if it was set in config, we now know it. | | 1132 | * if it was set in config, we now know it. |
1128 | */ | | 1133 | */ |
1129 | push_env_temp_dir (); | | 1134 | push_env_temp_dir (); |
| | | 1135 | |
| | | 1136 | /* cvsacl patch */ |
| | | 1137 | parse_aclconfig (current_parsed_root->directory); |
1130 | } | | 1138 | } |
1131 | | | 1139 | |
1132 | #ifdef CLIENT_SUPPORT | | 1140 | #ifdef CLIENT_SUPPORT |
1133 | /* Need to check for current_parsed_root != NULL here since | | 1141 | /* Need to check for current_parsed_root != NULL here since |
1134 | * we could still be in server mode before the server function | | 1142 | * we could still be in server mode before the server function |
1135 | * gets called below and sets the root | | 1143 | * gets called below and sets the root |
1136 | */ | | 1144 | */ |
1137 | if (current_parsed_root != NULL && current_parsed_root->isremote) | | 1145 | if (current_parsed_root != NULL && current_parsed_root->isremote) |
1138 | { | | 1146 | { |
1139 | /* Create a new list for directory names that we've | | 1147 | /* Create a new list for directory names that we've |
1140 | sent to the server. */ | | 1148 | sent to the server. */ |
1141 | if (dirs_sent_to_server != NULL) | | 1149 | if (dirs_sent_to_server != NULL) |
1142 | dellist (&dirs_sent_to_server); | | 1150 | dellist (&dirs_sent_to_server); |
| @@ -1496,19 +1504,19 @@ getoptreset (void) | | | @@ -1496,19 +1504,19 @@ getoptreset (void) |
1496 | optind = 1; | | 1504 | optind = 1; |
1497 | #else | | 1505 | #else |
1498 | optind = 0; | | 1506 | optind = 0; |
1499 | #endif | | 1507 | #endif |
1500 | opterr = 1; | | 1508 | opterr = 1; |
1501 | } | | 1509 | } |
1502 | | | 1510 | |
1503 | | | 1511 | |
1504 | void | | 1512 | void |
1505 | usage (register const char *const *cpp) | | 1513 | usage (register const char *const *cpp) |
1506 | { | | 1514 | { |
1507 | (void) fprintf (stderr, *cpp++, program_name, cvs_cmd_name); | | 1515 | (void) fprintf (stderr, *cpp++, program_name, cvs_cmd_name); |
1508 | for (; *cpp; cpp++) | | 1516 | for (; *cpp; cpp++) |
1509 | (void) fprintf (stderr, *cpp); | | 1517 | (void) fprintf (stderr, "%s", *cpp); |
1510 | exit (EXIT_FAILURE); | | 1518 | exit (EXIT_FAILURE); |
1511 | } | | 1519 | } |
1512 | | | 1520 | |
1513 | /* vim:tabstop=8:shiftwidth=4 | | 1521 | /* vim:tabstop=8:shiftwidth=4 |
1514 | */ | | 1522 | */ |