1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234
|
2024-08-09 Sergey Poznyakoff <gray@gnu.org>
Version 2.4
2024-07-09 Sergey Poznyakoff <gray@gnu.org>
Version 2.3.90
2024-06-14 Sergey Poznyakoff <gray@gnu.org>
Use getgrouplist, if available.
* configure.ac: Check if getgrouplist is available.
Define GNULIB_XALLOC_DIE to provide a prototype of xalloc_die
for gnulib.
* src/rush.c (get_user_groups): Use getgrouplist, if available.
2024-06-09 Sergey Poznyakoff <gray@gnu.org>
Fix rush-po
* src/rush-po: Fix processing of quoted strings.
Fix recognition of "exit" rules.
2023-11-26 Sergey Poznyakoff <gray@gnu.org>
Minor change.
* src/cf.c (make_socket): Use getaddrinfo.
2023-06-02 Sergey Poznyakoff <gray@gnu.org>
Add missing include
Switch to newer autotools
2023-04-05 Sergey Poznyakoff <gray@gnu.org>
Fix bug in handling of the "message" statement
* src/rush.c (set_error_msg): Copy message text.
2023-01-22 Sergey Poznyakoff <gray@gnu.org>
Update copyright years
2022-07-16 Sergey Poznyakoff <gray@gnu.org>
Version 2.3
2022-07-13 Sergey Poznyakoff <gray@gnu.org>
Pull latest wordsplit
2022-07-13 Sergey Poznyakoff <gray@gnu.org>
Bugfix in remopt
* src/rush.c (remove_option): Make sure tail pointer never points
past the terminating null character.
2022-01-17 Sergey Poznyakoff <gray@gnu.org>
Improve previous commit
2022-01-12 Sergey Poznyakoff <gray@gnu.org>
Fix EOF check with flex >= 2.6.1
2022-01-02 Sergey Poznyakoff <gray@gnu.org>
Version 2.2
Update copyright year
2021-09-01 Sergey Poznyakoff <gray@gnu.org>
Add missing includes
2021-08-28 Sergey Poznyakoff <gray@gnu.org>
transform: fix replacement of numbered pattern instance
* src/transform.c (_single_transform_name_to_slist): Avoid
duplicating
initial prefix if replace is not needed.
* tests/transform.at: Add new testcases.
2021-04-07 Sergey Poznyakoff <gray@gnu.org>
Pull wordsplit
2021-02-16 Sergey Poznyakoff <gray@gnu.org>
Bugfix
* src/rush.c: Expand argument to -X test
2021-02-16 Sergey Poznyakoff <gray@gnu.org>
Implement file type and ownership tests
* NEWS: Document changes.
* configure.ac: Version 2.1.90. Raise autoconf and automake
requirements.
* doc/rush.texi: Document changes.
* src/cfgram.y: New rule for file system tests.
* src/cflex.l: New rule for the TEST token.
* src/rush.c (groupmember): Change type of the first argument.
(rush_access,eval_fstest): New functions.
(test_eval): Process the test_fstest node type.
* src/rush.h (test_fstest): New node type.
(fstest_op): New enum.
(test_node): New member: fstest
* tests/.gitignore: Add mksock
* tests/mksock.c: New file.
* tests/fstest.at: New test.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Likewise.
2021-01-06 Sergey Poznyakoff <gray@gnu.org>
Update copyright years
2020-06-14 Sergey Poznyakoff <gray@gnu.org>
Use wordsplit v1.1
2019-07-12 Sergey Poznyakoff <gray@gnu.org>
Version 2.1
2019-07-10 Sergey Poznyakoff <gray@gnu.org>
Use wordsplit for a submodule
2019-07-01 Sergey Poznyakoff <gray@gnu.org>
Bugfixes
* doc/rush.rc.5: Fix typo.
* src/cfgram.y: Allow for multiple EOLs and comments after
the preface
statement.
* src/cflex.l: \n produces a single EOL token
* tests/regexp.at: Fix improper usage of literal user name in the
expected string.
2019-07-01 Sergey Poznyakoff <gray@gnu.org>
Version 2.0
2019-06-30 Sergey Poznyakoff <gray@gnu.org>
Minor fix
* configure.ac: Version 1.9.91
* NEWS: Update.
* src/cfgram.y: Fix calls to compile_transform_expr.
* src/config.c: Likewise.
* src/rush.c (die): Allow for fmt==NULL.
(die_usage): New function.
* src/rush.h (die_usage): New proto.
(compile_transform_expr): Change signature.
* src/transform.c (parse_transform_expr): Take struct cfloc * as
an additional argument. Use it in diagnostics.
(compile_transform_expr): Likewise.
2019-06-29 Sergey Poznyakoff <gray@gnu.org>
Issue a notice when parsing a legacy configuration file
* NEWS: Document changes.
* doc/rush.texi: Fix references to the legacy syntax docs.
* src/config.c (cfparse_old): Issue a notice.
* src/rush.c (vlogmsg): Discern between LOG_INFO and LOG_NOTICE.
* tests/legacy/argc.at: Update stderr expectation.
* tests/legacy/backref.at: Likewise.
* tests/legacy/chdir.at: Likewise.
* tests/legacy/command.at: Likewise.
* tests/legacy/delete.at: Likewise.
* tests/legacy/env.at: Likewise.
* tests/legacy/error.at: Likewise.
* tests/legacy/fallthrough.at: Likewise.
* tests/legacy/gid.at: Likewise.
* tests/legacy/interactive.at: Likewise.
* tests/legacy/map.at: Likewise.
* tests/legacy/match.at: Likewise.
* tests/legacy/matchprog.at: Likewise.
* tests/legacy/newgrp.at: Likewise.
* tests/legacy/set.at: Likewise.
* tests/legacy/setvar.at: Likewise.
* tests/legacy/transform.at: Likewise.
* tests/legacy/uid.at: Likewise.
* tests/legacy/umask.at: Likewise.
* tests/legacy/unsetvar.at: Likewise.
2019-06-29 Sergey Poznyakoff <gray@gnu.org>
Finish the docs
2019-06-27 Sergey Poznyakoff <gray@gnu.org>
New transformation statements: insert and remopt
* doc/rush.rc.5: Update (unfinished).
* doc/rush.texi: Document the changes.
* etc/rush.rc (svn): Rewrite the rule using insert and remopt.
* src/cfgram.y: New statements: insert and remopt.
* src/cflex.l: New keywords.
* src/config.c (_parse_transform_ar,_parse_map_ar)
(_parse_delete_ar,_parse_delete): Initialize
node->target.v.arg.ins
to 0.
* src/rush.c (get_arg_no): Strict boundary checking.
(rush_transform): Special handling for transform_remopt.
Support argument insertions.
* src/rush.h (transform_target.arg): Change type.
(transform_remopt): New constant.
(option_defn): New struct.
(transform_node.v.remopt): New member.
* tests/insert.at: New file.
* tests/remopt.at: New file.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Include new tests.
2019-06-13 Sergey Poznyakoff <gray@gnu.org>
Make sure user-defined variables are given preference over the
environment ones.
The order of precedence is: (1) request variables, (2) user
variables,
(3) environment.
* lib/wordsplit.c (wordsplit_find_env): Rewrite as
wsplt_env_lookup
(wsplt_env_getvar): New function.
(expvar): Select preference of wsplt_env_lookup
vs. wsplt_env_getvar
depending on the value if WRDSO_GETVARPREF option.
* lib/wordsplit.h (WRDSO_GETVARPREF): New option.
* src/map.c (rush_expand_string): Set WRDSO_GETVARPREF option.
2019-06-13 Sergey Poznyakoff <gray@gnu.org>
Propagate changes to the environment due to ${X=V} constructs.
* doc/rush.texi: Document the evalenv statement.
* lib/wordsplit.c (_wsplt_store_errctx): Fix typo in the error
message.
(wsplt_assign_var): Fix a +1 offset of the ws_envidx field.
* src/cfgram.y: New rule for the evalenv statement.
* src/cflex.l: Likewise.
* src/map.c (find_user_varptr): New function.
(rush_getvarptr): Use find_user_varptr.
(getvar): Try user-defined variables if no request variable
matched.
Environment variables are handled by wordsplit itself.
(rush_expand_string): Pass environment to wordsplit. Propagate
changes
back to req->env and req->var_kv.
* src/rush.c (envar_eval): New case.
* src/rush.h (envar_eval): New constant.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Add new test.
* tests/evalenv.at: New test.
2019-06-06 Sergey Poznyakoff <gray@gnu.org>
Minor fix in wordsplit (pull from grecs a0c096190f)
2019-06-03 Sergey Poznyakoff <gray@gnu.org>
Minor fix
* lib/librush.h (wildmatch): Both string arguments are constant.
* lib/wildmatch.c: Likewise.
2019-06-01 Sergey Poznyakoff <gray@gnu.org>
Bugfix
* lib/wildmatch.c (wilder_match): Fix processing of Kleene star.
2019-05-31 Sergey Poznyakoff <gray@gnu.org>
Fix typo
2019-05-21 Sergey Poznyakoff <gray@gnu.org>
Accept wildcards as arguments to keepenv and unsetenv commands.
* lib/wildmatch.c: New source.
* lib/Makefile.am: Add wildmatch.c
* lib/librush.h (wildmatch): New proto.
* src/cfgram.y (asgn_list): Accept quoted strings.
(unset_envar): New function.
(env_setup): Call unset_envar.
* tests/keepenv.at: Test new features.
* tests/unsetenv.at: Likewise.
* doc/rush.8: Update.
* doc/rush.rc.5: Start rewriting.
* doc/rush.texi: Update.
2019-05-16 Sergey Poznyakoff <gray@gnu.org>
Synch with grecs 1fa2dd2c
2019-05-15 Sergey Poznyakoff <gray@gnu.org>
Rename "member" test to "group"
2019-05-15 Sergey Poznyakoff <gray@gnu.org>
Bugixes
* doc/rush.texi: Revise the docs.
* etc/rush.rc: Fix typo.
* src/cf.c (glattrib_debug): Don't override the value set from the
command line.
2019-05-15 Sergey Poznyakoff <gray@gnu.org>
Report names of undefined variables
* lib/wordsplit.c: Import from grecs 20899f65
* lib/wordsplit.h: Likewise.
* src/map.c (rush_ws_error): New function.
(rush_expand_string): Set ws.ws_error. Use error context when
reporting WRDSE_UNDEF.
* src/rush.c (main): Use reparse_cmdline.
* src/rush.h (rush_ws_error): New proto.
* tests/undef.at: Update.
2019-05-15 Sergey Poznyakoff <gray@gnu.org>
Refuse to set or unset read-only request variables.
Among the request variables, only $program, $command, and
positional variables can be changed. Neither $program nor
$command can be unset. Unsetting a positional variable has
the same effect as deleting it.
* doc/rush.texi: Improve docs.
* src/cf.h (new_rush_rule): Change signature.
* src/cfgram.y: Refuse to modify read-only variables.
New statement: unset [N] (equivalent to "delete N")
* src/config.c (parse_input_buf): Rule tag generation is
handled by new_rush_rule now.
* src/map.c (vardef): New field: target.
(rush_variable_target): New function.
(rush_request_getvar): Removed.
(rush_getvarptr): New function to use instead of it.
* src/rush.c (rush_transform): Use rush_getvarptr
* src/rush.h (target_readonly): New target type.
(rush_request_getvar): Remove proto.
(rush_getvarptr)
(rush_variable_target): New proto.
* tests/delete.at: Reflect the changes.
* tests/setvar.at: Likewise.
* tests/unsetvar.at: Likewise.
2019-05-14 Sergey Poznyakoff <gray@gnu.org>
Import wordsplit from grecs 1658f568
* doc/rush.texi: Document $#
* lib/wordsplit.c: Update.
* lib/wordsplit.h: Update.
* src/cflex.l: Handle $#, $@, and $* as one word.
* src/config.c (_parse_argc): Translate to $#
* src/map.c (var_argc): Remove.
(request_vars): Remove argc.
* tests/argc.at: Use $# instead of $argc
* tests/compound.at: Likewise.
2019-05-14 Sergey Poznyakoff <gray@gnu.org>
Import wordsplit from grecs 8652a500
This fixes handling of variable and command references in
the request
command line.
2019-05-14 Sergey Poznyakoff <gray@gnu.org>
docs: spell checking
2019-05-13 Sergey Poznyakoff <gray@gnu.org>
Convert example configuration to the new format
2019-05-13 Sergey Poznyakoff <gray@gnu.org>
Add support for ${-N} argument references
* lib/wordsplit.c (ISPOSBEG): New define.
(expvar): Support for ${-N} notation.
* src/cflex.l: Support for ${-N} notation.
* tests/matcharg.at: Test ${N} and ${-N} notations.
2019-05-12 Sergey Poznyakoff <gray@gnu.org>
Rewrite rush.texi (initial draft)
2019-05-12 Sergey Poznyakoff <gray@gnu.org>
Improve the "member" condition
* src/cfgram.y: "member" condition can take one argument.
2019-05-10 Sergey Poznyakoff <gray@gnu.org>
Improve scanner
* src/cf.c (cfstream_open_stdin): New function.
(cfstream_avail): Use eof field.
* src/cf.h (CFSTREAM): New field: eof.
(cfstream_open_stdin,cflex_test,dumpstr): New proto.
* src/cflex.l: Don't expand escapes within ${V:-""} construct.
Keep track of locations when returning single-character tokens.
(cflex_test): New function.
* src/dump.c (dumpstr): New function.
* src/map.c (rush_expand_string): Retain backslash in invalid
escape sequences.
* src/rush.c: Implement scanner test mode.
* src/rushopt.opt (-T): New option.
* tests/lex.at: New test.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Add new test.
2019-05-09 Sergey Poznyakoff <gray@gnu.org>
Update rush-po to support both versions of the configuration file.
2019-05-08 Sergey Poznyakoff <gray@gnu.org>
Fixes in scanner
* src/cflex.l: Merge INMATCH and ARGS.
Generalize rule for unquoted strings.
Use stringbuf_add_escape_octal and
stringbuf_add_escape_hex (complements dc4dcf015f24).
2019-05-08 Sergey Poznyakoff <gray@gnu.org>
New comparison operator !~
* src/cfgram.y: New production.
* src/cflex.l: Handle !~
* tests/regexp.at: Add new test.
2019-05-08 Sergey Poznyakoff <gray@gnu.org>
Additional documentation
2019-05-07 Sergey Poznyakoff <gray@gnu.org>
Bugfixes.
* src/cf.c (cfstream_open_file)
(cfstream_open_mem,cfstream_rewind): Initialize eol to 0.
(cfstream_read): Force final newline.
* src/cf.h (CFSTREAM): New field: eol.
* src/cfgram.y: Initialize current_rule->file and line.
2019-05-07 Sergey Poznyakoff <gray@gnu.org>
Implement include statements
* src/cf.c (cfstream_same_file): New function.
* src/cf.h (cfstream_same_file): New proto.
* src/cfgram.y: Fix processing of the "include" statement.
(new_envar): Bugfix. Initialize the "next" field.
* src/cflex.l: Fix processing of the "include" statement.
Forbid the use of "rule" and "global" in include files.
* src/rush.c (env_setup): Catch internal errors.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Add new files.
* tests/inc00.at: New file.
* tests/inc01.at: New file.
2019-05-07 Sergey Poznyakoff <gray@gnu.org>
Minor fixes
* src/cfgram.y: Free unnecessary string values.
2019-05-06 Sergey Poznyakoff <gray@gnu.org>
Use consistent printable token representation.
2019-05-06 Sergey Poznyakoff <gray@gnu.org>
Change config format version recognition.
* src/cf.h (cflex_normal): New proto.
* src/cfgram.y: Change format version selection algorithm.
* src/cflex.l: Likewise.
2019-05-06 Sergey Poznyakoff <gray@gnu.org>
Fix testsuite
* tests/delete.at: Add missing "rush 2.0" preface.
2019-05-06 Sergey Poznyakoff <gray@gnu.org>
Fix backreference expansion.
* src/cfgram.y (eol): New production. Use it instead of the
EOL token.
* src/cflex.l: Optimize handling of backslash escapes in quoted
strings.
* src/dump.c (dump_string_data): Fix escaping.
* src/map.c (expandref): Allow for accessing backreferences with
numbers greater than 9. The syntax is %{NN}.
(rush_expand_string): Expand backreferences before all other
expansions,
to avoid spurious expansion of '%' sequences obtained as a
result of
variable expansion.
Don't expand '\%'.
* tests/Makefile.am: Add new tests.
* tests/backref.at: Test the %{N} form.
* tests/testsuite.at: Add new tests.
* tests/qstr.at: New test case.
2019-05-06 Sergey Poznyakoff <gray@gnu.org>
Improve parser. Add more tests.
* src/cf.c: New global option "expand-undefined".
(global_attrib_set): Handle the 'b' data type marker.
* src/cf.h (expand_undefined): New extern.
* src/cfgram.y: Provide textual descriptions for named tokens.
Require '=' or '=~' between identifier and value in SET and SETENV
rules. Allow for values in UNSETENV list.
* src/cflex.l: Accept slashes in unquoted strings.
Gracefully handle undefined escape sequences in strings.
* src/map.c (expand_undefined): New global.
(rush_expand_string): Expand undefined variables to empty strings
if expand_undefined is set.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Add new tests.
* tests/backref.at: New file.
* tests/clrenv.at: New file.
* tests/keepenv.at: New file.
* tests/regexp.at: New file.
* tests/setenv.at: New file.
* tests/setvar.at: New file.
* tests/undef.at: New file.
2019-05-04 Sergey Poznyakoff <gray@gnu.org>
Add testcases for the new rc syntax
* src/Makefile.am (EXTRA_DIST): Add cfgram.output
(AM_YFLAGS): Produce state map.
* src/cf.c (vcferror): Finalize the stringbuf.
* src/cf.h (cflex_pushargs,cflex_popargs)
(skiptoeol,restorenormal): New protos.
* src/cfgram.y: Provide textual token descriptions.
Minor fixes in the grammar.
* src/cflex.l: Various fixes.
* tests/Makefile.am: Move old tests to the legacy/ subdirectory.
Add new tests.
2019-05-03 Sergey Poznyakoff <gray@gnu.org>
Simplify parser
2019-05-03 Sergey Poznyakoff <gray@gnu.org>
Bugfixes
* src/cf.c (cfloc_print): Don't null-terminate the string.
* src/cf.h (cflex_debug,cfgram_debug): New protos.
(curloc): New extern.
* src/cfgram.y (yyerror): Rewrite using vlogmsg.
(cfgram_debug): New function.
* src/cflex.l (cflex_debug): New function.
* src/rush.c (main): Configure parser and scanner traces if
-x was given.
* src/rushopt.opt (-x, --trace): New option.
2019-05-03 Sergey Poznyakoff <gray@gnu.org>
Major rewrite: implement rest of configuration file statements
* src/cf.c: Add functions for handling the following statements:
Rule attributes:
umask OCTAL
chroot STRING
chdir STRING
fork BOOL
acct BOOL
post-socket STRING
text-domain STRING
locale-dir STRING
locale STRING
interactive BOOL
newgroup|newgrp STRING
Global attributes:
debug STRING
message sleep-time|usage-error
|nologin-error|config-error
|system-error STRING
regexp [+-]STRING ...
include-security STRING...
acct-file-mode OCTAL
acct-dir-mode OCTAL
acct-umask OCTAL
* src/cf.h: New prototypes.
* src/cfgram.y: New statement "global". Handle rule and global
attributes.
Rewrite strlist support.
* src/cflex.l: New rules for handling rule and global attributes,
and
the new "global" keyword.
Handle +STRING, -STRING, and positional arguments as strings.
* src/config.c (_parse_re_flags): Bugfix. "basic" and "icase"
were mishandled if prefixed with "+" or "-"
(_parse_acct_umask): Bugfix. rushdb_dir_mode was changed,
instead of
rushdb_umask.
(all): Use functions from cf.c where possible. Use cferror
for error
reporting.
2019-05-02 Sergey Poznyakoff <gray@gnu.org>
Begin major rewrite
* configure.ac: Version 1.9.90.
Check for yacc and lex
* src/Makefile.am: Add new files.
* src/cf.c: New file.
* src/cf.h: New file.
* src/cfgram.y: New file.
* src/cflex.l: New file.
* src/config.c: Use new I/O functions and control structures.
* src/limits.c (limits_record_create)
(limits_record_add): New functions.
(parse_limits): Use them. Improve error reporting.
* src/map.c: New built-in rush variable "argc".
(rush_request_getvar,rush_request_delvar): New functions.
(getvar): Support negative positional argument indexes.
* src/rush.c: Rewrite test, transformation and environment
evaluator.
Use cfparse to process configuration file.
* src/rush.h (transform_target_type): New enum.
(transform_target): New struct.
(transform_node,test_node): Complete rewrite.
(test_type): New enum.
(cmp_match,cmp_in): New opcodes.
(test_numeric_node,test_arg_node): Remove.
(rush_num_t): New data type.
(rush_bool_t): New data type.
(rush_error): New struct.
(rush_rule): Remove test_head, test_tail; Use test_node instead.
Remove error_msg, error_fd; Use single pointer instead.
New fields: clrenv, envar_head, envar_tail.
(vlogmsg): New proto.
(limits_record_create)
(limits_record_add)
(rush_request_getvar)
(rush_request_delvar)
(new_standard_error)
(new_error)
(rush_error_msg): New protos.
(envar_type): New enum.
(envar): New struct.
* lib/wordsplit.c (wordsplit_finish): Return single empty word in
ws_wordv[0] on empty input.
* tests/unsetvar.at: Fix typo
2019-04-24 Sergey Poznyakoff <gray@gnu.org>
Version 1.9
2019-04-23 Sergey Poznyakoff <gray@gnu.org>
Minor fixes
2019-04-23 Sergey Poznyakoff <gray@gnu.org>
New program rush-po
Extracts translatable strings from the rush
configuration. Replaces
rush-po.awk
2019-04-22 Sergey Poznyakoff <gray@gnu.org>
Revise the docs
2019-04-20 Sergey Poznyakoff <gray@gnu.org>
Implement backreference expansion and user-defined variables
* NEWS: Updated.
* configure.ac: Version 1.8.90
* doc/rush.texi: Document new features.
* gnulib.modules: Remove obstack
* src/config.c (_parse_command)
(_parse_match): Don't pass REG_NOSUB flag. Subexpressions
are needed
now.
(_parse_setvar,_parse_unsetvar): New functions.
(TOK_ASSC): New token type.
(parse_input_buf): Handle TOK_ASSC tokens.
(toktab): Two new statements: setvar and unsetvar.
* src/dump.c: Include user-defined variables to the dump.
* src/map.c (rush_expand_string): Pass user-defined variables to
wordsplit. Expand backreferences.
* src/rush.c (test_regex): New function.
(test_request_cmdline)
(test_request_arg): Use test_regex.
(expand_dir): New function.
(transform_setvar_fun): New function.
(run_rule): Use expand_dir to process directories.
* src/rush.h (transform_setvar)
(transform_unsetvar): New transform types.
(transform_node): New member: varname.
(rush_backref): New struct.
(rush_request): Keep track of backreferences.
* tests/Makefile.am: Add new tests.
* tests/backref.at: New test.
* tests/setvar.at: New test.
* tests/unsetvar.at: New test.
* tests/testsuite.at (m4_run_rush, m4_fmt_out)
(m4_fmt_err, m4_fmt_out): Escape any double-quotes present
in the argument to -c.
Include new tests.
* gnulib.modules: Remove obstack.
* lib/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR.
* lib/i18n.c: Forget about configmake.h
* po/POTFILES.in: Update.
2019-04-20 Sergey Poznyakoff <gray@gnu.org>
Rewrite string expansion via wordsplit.
Note: this commit drops support for $^ variable.
* lib/wordsplit.c: Pull from grecs
3e07e3ad30e8a7a091e213eb4df839b7cf7f1e64
* lib/wordsplit.h: Likewise.
* src/map.c (rush_expand_string): Use wordsplit to expand string.
* tests/transform.at: Use $program instead of ${^}
2019-04-19 Sergey Poznyakoff <gray@gnu.org>
Update copyright years
Upgrade gnulib
Upgrade wordsplit from grecs
1498bd570eb001a6b2bc3f1a5074e8b384d6db30
2019-04-19 Sergey Poznyakoff <gray@gnu.org>
Minor fixes.
* gnulib.modules: Remove vasprintf.
* lib/rushdb.c (format_error): Use static buffer.
* lib/wtmp.c (output_duration): Make sure outbytes is always
initialized.
(rush_wtmp_rewind,rush_wtmp_read): Add default statements,
just in case.
* src/rush.c (main): Check return from setuid.
2019-04-19 Sergey Poznyakoff <gray@gnu.org>
Minor doc fixes
* doc/Makefile.am: Rename rush.1
* doc/rush.1: Move to section 8
* doc/rush.rc.5: Fix section number.
* doc/rush.texi: Fix wording of the copyright statement to
match exactly
that of GFDL without invariant sections.
2019-04-19 Sergey Poznyakoff <gray@gnu.org>
Minor fix
* src/rush.c: Remove unnecessary condition
2017-01-02 Sergey Poznyakoff <gray@gnu.org>
Happy GNU Year
2016-10-01 Sergey Poznyakoff <gray@gnu.org>
Version 1.8
2016-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Fix testsuite
Use AT_CHECK_UNQUOTED with variable substitution instead of
postprocessing stderr and stdout with sed.
2016-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
Fix spelling errors
2016-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Document the request dump mode.
2016-08-20 Sergey Poznyakoff <gray@gnu.org>
Bugfixes
2016-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes
* src/config.c (TOK_ENV): New flag.
(toktab): Mark "env" with this flag.
(parse_input_buf): If TOK_ENV bit is set, do environment
variable expansion.
* src/rush.c (env_setup): Bugfixes. Make sure it operates
exactly as documented.
(run_transforms): Major cleanup.
* tests/env.at: New tests.
* NEWS: Document the changes.
* doc/rush.rc.5: Likewise.
* doc/rush.texi: Likewise.
2016-08-19 Sergey Poznyakoff <gray@gnu.org.ua>
Finish the testsuite.
* doc/rush.rc.5: Fix typos.
* doc/rush.texi: Likewise.
* src/dump.c (dump_argv): Optionally sort the array.
* src/map.c (meta_expand_string): Fix $N evaluation.
(mapdef): Allow to use ${^} as a synonym to ${program}.
* src/rush.c (env_setup): Fix handling of NAME+= and NAME=+
* tests/Makefile.am: Add new files.
* tests/atlocal.in (RUSHDIR): New variable.
(myfilter): New function.
* tests/testsuite.at (AT_RUSH_TEST): Handle optional
environment and interactive settings.
Include New tests.
* tests/chdir.at: New file.
* tests/delete.at: New file.
* tests/env.at: New file.
* tests/error.at: New file.
* tests/fallthrough.at: New file.
* tests/gid.at: New file.
* tests/interactive.at: New file.
* tests/map.at: New file.
* tests/newgrp.at: New file.
* tests/set.at: New file.
* tests/transform.at: New file.
* tests/uid.at: New file.
* tests/umask.at: New file.
2016-08-18 Sergey Poznyakoff <gray@gnu.org.ua>
Fix typos
2016-08-18 Sergey Poznyakoff <gray@gnu.org.ua>
Add testsuite
* .gitignore: Update
* src/.gitignore: Update.
* Makefile.am (SUBDIRS): Add tests
* configure.ac: Initialize testsuite
* src/Makefile.am (rush_SOURCES)L Add dump.c
* src/dump.c: New file.
* src/rush.c (dump_option): New variable.
(run_rule): Dump request if dump_option is set.
* src/rush.h (dump_option): New extern.
(dump_request): New proto.
* src/rushopt.opt: New option --dump (-D)
* tests/Makefile.am: New file.
* tests/testsuite.at: New file.
* tests/.gitignore: New file.
* tests/argc.at: New file.
* tests/atlocal.in: New file.
* tests/command.at: New file.
* tests/match.at: New file.
* tests/matchprog.at: New file.
* tests/myid.c: New file.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Simplify the debugging code
* src/rush.h (debug): Rewrite as a variadic macro.
(debug2-debug6): Remove.
* src/config.c: Use the debug macro.
* src/limits.c: Likewise.
* src/rush.c: Likewise.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Get rid of the argmatch module
* gnulib.modules: Remove argmatch
* src/rush.h: Remove argmatch.h
* src/cfck.c (chk_args): Change into struct.
(chk_vals): Remove.
(cfck_keyword): Rewrite.
* src/rush.c (string_to_error_index): Scan array.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright years in --version output
* src/getopt.m4 (version_etc_copyright): Update copyright years.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Update wordsplit.
* lib/wordsplit.c: Update.
* lib/wordsplit.h: Update.
* src/rush.c: Use wordsplit_getwords to steal
parsed-out words from the wordsplit_t.
* src/rush.h (rush_request) <argc>: Change type to size_t.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix
* lib/rushdb.c (output_duration): Fix format specification.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright years
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Redo support for interactive requests
* src/rush.h (rush_rule, rush_request) <interactive>: New member.
* src/rush.c (rush_interactive_shell): Remove.
(match_rule): Remove.
(env_concat): Fix eventual use of uninitialized
variable.
(run_rule): Select the return message depending on whether
the request is interactive.
Fix up argv[0] for interactive requests.
(main): Redo support for interactive requests.
* src/rushopt.opt: New option -i
* src/config.c: The interactive keyword must be used within
a rule.
* doc/rush.texi: Document new interactive features.
* NEWS: Likewise.
* doc/rush.1: Update.
* doc/rush.rc.5: Update.
* doc/rushlast.1: Update.
* doc/rushwho.1: Update.
* src/map.c: Minor change.
2016-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.7.91
Add gnulib as a submodule
* .gitignore: Update.
* .gitmodules: Update.
Set version number 1.7.91
* configure.aca: Update.
* NEWS: Update.
* README: Update.
Fix documentation.
* src/getopt.m4: Fix --usage output.
* doc/rush.1: New file.
* doc/rushlast.1: New file.
* doc/rushwho.1: New file.
* doc/rush.rc.5: New file.
* doc/Makefile.am: Distribute new manpages.
2015-04-24 Sergey Poznyakoff <gray@gnu.org.ua>
Fix doc generation.
Default Config file applied to all output formats, which is wrong.
Use a dedicated configuration file for html output formats, and
defaults for the rest.
* doc/Makefile.am (GENDOCS): Add html-specific configuration file.
* doc/Config: Rename to doc/html.init (with changes).
2015-03-01 Sergey Poznyakoff <gray@gnu.org>
Switch to Texinfo 5.0
* doc/Config: Rewrite.
* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
* doc/gendocs_template: Ps is not built
* imprimatur: Upgrade.
2014-05-26 Sergey Poznyakoff <gray@gnu.org>
Update copyleft years
2014-02-11 Sergey Poznyakoff <gray@gnu.org>
bootstrap.conf: initialize submodules
2014-01-20 Mats Erik Andersson <gnu@gisladisker.se>
Protect against CVE-2013-6889 (tiny change).
Reset the effective user identification in testing mode.
2013-12-18 Sergey Poznyakoff <gray@gnu.org.ua>
Implement the "none" keyword in the "include-security" statement.
Use imprimatur as submodule.
2013-12-17 Sergey Poznyakoff <gray@gnu.org.ua>
Use wordsplit instead of the obsolete argcv_ stuff
* lib/argcv.h: Remove.
* lib/wordsplit.c: New file (from grecs).
* lib/wordsplit.h: Likewise.
* lib/Makefile.am (librush_a_SOURCES): Update.
* lib/argcv.c: Rewrite.
* lib/librush.h (slist_alloc)
(argcv_free,argcv_string): New protos.
* lib/slist.c (new_line_seg): New function.
* src/config.c: Use wordsplit.
* src/map.c: Likewise.
* src/rush.c: Likewise.
* src/rush.h: Include wordsplit.h
* .gitignore: Update
* po/.gitignore: Update
2013-06-19 Sergey Poznyakoff <gray@gnu.org.ua>
Reread passwd database after chrooting.
* src/rush.c (run_rule): Reread pw after chrooting.
2013-06-19 Sergey Poznyakoff <gray@gnu.org.ua>
Set supplementary groups when switching to user privileges.
* src/rush.c (membergid, get_user_groups)
(setowner): New static functions.
(run_rule): Call setowner to switch to user privileges.
2011-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.7.90
2011-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
Assorted fixes.
* lib/rushdb.c (output_duration): Select the best suitable time
representation for the requested width.
* NEWS: Fix typo.
* lib/librush.h (RUSH_NORETURN): New define.
* src/rush.h: Use RUSH_NORETURN.
2011-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix
* src/socket.c (post_socket_send): Use "a+" file mode. Suggested
by Mats Erik Andersson.
2011-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
Remove obsolete gnulib modules.
2010-07-07 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.7
* NEWS: Update.
* configure.ac: Update.
2010-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
Allow the use of symbolic names in 'uid' and 'gid'. New command
'newgrp'.
This also undoes commit ccb22a037, which became superfluous with
the advent of these changes.
* src/config.c (parsegid, parseuid): New functions.
(new_rush_rule): Initialize gid to NO_GID.
(parse_cmp_op): Handle != (accidentally sunonymous to !)
(numstrtonum): New function.
(parse_numtest): Take conversion function as 4th argument.
All callers updated.
(uidtonum): New function.
(_parse_uid): Use uidtonum as a conversion function.
(gidtonum): New function.
(_parse_gid): Use gidtonum as a conversion function.
(_parse_newgroup): New function.
(_parse_main_group): Remove.
(toktab): Remove "main-group", add "newgroup" and
"newgrp".
* src/rush.c (groupcmp): Remove princ parameter. All
callers updated.
(test_request): Remove test_request_main_group.
(run_rule): Handle `newgrp' request.
(main): Initialize req.gid to NO_GID.
* src/rush.h (test_type): Remove test_main_group.
(rush_rule)<gid>: New member.
(rush_request)<gid>: New member.
(NO_GID): New constant.
* doc/rush.texi: Update.
* NEWS, configure.ac: Set version 1.6.91
2010-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
Add new condition: main-group.
* src/config.c (toktab): New condition main-group.
* src/rush.c (groupcmp): New argument `princ' specifies
whether to match only principal group or all the groups
the user is member of.
(test_request_group): Call groupcmp with princ=0.
(test_request_main_group): New test.
(test_request): Add test_request_main_group.
* src/rush.h (test_type): New type test_main_group.
* NEWS, THANKS: Update.
2010-04-21 Sergey Poznyakoff <gray@gnu.org.ua>
Allow for "include" statements outside of rule context.
* src/config.c (toktab): Remove TOK_RUL from the flags.
2010-04-20 Sergey Poznyakoff <gray@gnu.org.ua>
Update NEWS.
2010-04-20 Sergey Poznyakoff <gray@gnu.org.ua>
Improve rule parsing.
A configuration file consisting of a single fall-through rule
caused infinite loop in main.
* src/rush.c (match_rule): return immediately if
rule is NULL.
(run_rule): Run accounting only if req->acct is
rush_true.
(main): Break the loop when NULL rule is hit.
Report "no matching rule" if exited from the
loop.
2010-04-20 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix
* src/rush.c (run_transforms)<transform_setcmd>: Add
GET_TGT_VAL();
2010-04-17 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.6.90
* configure.ac: Update version number.
* NEWS: Update.
2010-04-17 Sergey Poznyakoff <gray@gnu.org.ua>
Configurable permissions for accounting database.
* lib/librush.h (rush_wtmp_mode): Remove.
(rushdb_umask, rushdb_dir_mode, rushdb_file_mode): New externs.
* lib/rushdb.c (rushdb_umask, rushdb_dir_mode)
(rushdb_file_mode): New variables.
(rushdb_open_internal): New function.
(rushdb_open): Call rushdb_open_internal after setting
the rushdb_umask.
(rushdb_print_header)<FDATA_STRING>: Fix first argument
to output_string.
* lib/utmp.c (rush_utmp_open): Use file permissions from
rushdb_file_mode.
* lib/wtmp.c (rush_wtmp_mode): Remove.
(rush_wtmp_open): Use file permissions from
rushdb_file_mode.
* src/config.c (parse_file_mode): New function.
(_parse_umask): Use parse_file_mode.
(_parse_acct_file_mode,_parse_acct_dir_mode)
(_parse_acct_umask): New functions.
(toktab): New keywords: acct-file-mode, acct-dir-mode, acct-umask.
* src/rush.c (run_rule): Don't set umask before calling
rushdb_open,
the function itself takes care of it.
* doc/rush.texi: Document new configuration statements.
* NEWS: Update.
2010-04-17 Sergey Poznyakoff <gray@gnu.org.ua>
Fix http://puszcza.gnu.org.ua/bugs/?127
* src/rush.c (make_file_name): Fix typo (misplaced
`+ 1').
2010-02-05 Sergey Poznyakoff <gray@gnu.org.ua>
Apply the default regex flags to `transfer' statement.
* src/rush.h (compile_transform_expr): Change signature.
* src/transform.c (parse_transform_expr)
(compile_transform_expr): Pass regcomp flags as argument.
* src/config.c (_parse_transform_common): Pass re_flags to
compile_transform_expr.
2010-02-05 Sergey Poznyakoff <gray@gnu.org.ua>
Improve configuration machinery.
* configure.ac: Enable silent rules. Require Automake 1.11.1.
* Makefile.am (make-ChangeLog): Remove rule.
(ChangeLog): Rewrite.
* src/Makefile.am (sbinPROGRAMS_INSTALL): Remove. New Automake
does
not support it any more. Instead use:
(change-suid-mode): New rule.
(install-exec-hook): New rule.
(defines.h): Make rule a silent one.
(.opt.h): Likewise.
2010-01-02 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright years.
Happy GNU Year!
2009-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
Fix doc/Commit
* doc/Commit (gray_print_section): Output anchors before
chapter/section/etc. titles, so that the heading menu in
monolithic document works properly.
2009-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes.
* configure.ac: Check for socket.h and sys/socket.h.
Needed for socklen_t check below.
* src/getopt.m4: Remove useless test.
2009-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs to match the new webpage format.
* doc/Makefile.am (manual.tar.bz2, man-tar): New rules.
(manual): Declare as phony.
* doc/gendocs_template: Rewrite.
* doc/rush.texi: Minor changes.
2009-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes
* src/getopt.m4 (BEGIN): Remove extra quoting.
(GETOPT): Rename c to optchar
* src/rlopt.opt: Change the way of handling -[0-9]+
argument. In particular, it is able to correctly
handle options like -10.
2009-02-12 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes
* configure.ac: Check for socklen_t.
* src/rush.h: Include sys/time.h;
Provide a backup definition for LOG_AUTHPRIV.
2009-02-10 Sergey Poznyakoff <gray@gnu.org.ua>
Fix diagnostic message in run_transforms
Update docs, set version number 1.6
Update docs
2009-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
Allow references to predefined error messages in `exit'
statements.
* NEWS, doc/rush.texi: Update
* src/cfck.c: Remove inclusion of argmatch.h
* src/config.c (_parse_usage_error, _parse_nologin_error)
(_parse_config_error, _parse_system_error): Use set_error_msg.
(_parse_exit): Special handling of initial @ in the message text.
* src/rush-po.awk: Special handling of initial @ in the message
text.
Capture arguments of usage-error, nologin-error, config-error and
system-error.
Fix input line counting.
* src/rush.c (error_msg): Array of structures.
(set_error_msg, string_to_error_index): New functions.
(send_msg): Use error_msg[type].custom to decide what textual
domain to use
for translation.
(run_transforms): Remove temp. The result of rush_expand_string
is assigned
to val directly and is never freed.
(run_rule): Special handling of initial @ in the error message
text.
* src/rush.h: Include argmatch.h
(error_msg): Remove declaration.
(set_error_msg, string_to_error_index): New prototypes.
2009-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs
2009-02-03 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs
2009-02-02 Sergey Poznyakoff <gray@gnu.org.ua>
Minor docs changes
2009-02-02 Sergey Poznyakoff <gray@gnu.org.ua>
Allow to use patterns in set rules.
* lib/argcv.c (quote_transtab): Add \v.
* src/config.c (_parse_set, _parse_set_ar): Store value in
node->pattern.
* src/rush.c (run_transforms): Use patterns in set rules.
(run_rule): Fix wording of a diagnostic message.
* src/rush.h (struct transform_node.v): Remove val.
* NEWS: Update
* doc/Makefile.am (check-writeme): New goal.
(all-check-docs): Add dependency on check-writeme.
* doc/rendition.texi (WRITEME): New macro.
* doc/rush.texi: Update.
2009-02-01 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change
2009-02-01 Sergey Poznyakoff <gray@gnu.org.ua>
Allow to specify source strings for transformations.
* NEWS: Update.
* lib/argcv.c (_ARGCV_WORD_SED_EXPR, _ARGCV_WORD_MASK): New
defines.
(argcv_scan): Treat sed expressions as words, if ARGCV_SED_EXPR
is set.
(argcv_get_np): Do not unquote word if ARGCV_QUOTE is not set,
or the
word is a sed expression.
(ARGCV_DEFFLAGS): Move to argcv.h
* lib/argcv.h (ARGCV_DEFFLAGS, ARGCV_SED_EXPR): New defines.
* src/config.c (_parse_transform_common): New function.
(_parse_transform,_parse_transform_ar): Call
_parse_transform_common.
(TOK_SED): New define.
(toktab): Mark `transform' with TOK_SED.
(parse_input_buf): Use argcv_get_np for field splitting. If the
token is
marked with TOK_SED, assume ARGCV_SED_EXPR flag.
* src/map.c (mapdef): New meta-variable: "command".
(rush_expand_string): New function.
* src/rush.c (run_transforms): Use node->pattern, if not NULL.
* src/rush.h (struct transform_node.pattern): New field.
(rush_expand_string): New proto.
2009-02-01 Sergey Poznyakoff <gray@gnu.org.ua>
Allow to modify program name, as opposed to argv[0]
* configure.ac, NEWS: Version 1.5.90
* lib/argcv.c, lib/argcv.h: Fix copyright years.
* src/config.c (new_transform_node): Take addtional argument. All
uses updated.
(struct stmt_env.progmode): New field.
(check_argc): New function.
(TOK_CRT): New token flag.
(toktab): New commands "delete" and "set".
Mark "transform" and "map" with TOK_CRT.
(parse_input_buf): If TOK_CRT is set, allow ^ as an index,
indicating
program name, as opposed to argv[0].
* src/map.c (mapdef): New meta-variable "program".
* src/rush.c (ARG_NO): New macro.
(test_request_arg): Use ARG_NO.
(get_arg_no,assign_string): New functions.
(run_transforms): Handle delete and set commands. Set or modify
program name, if required ([^]).
(run_rule): Use req->prog, if set.
* src/rush.h (transform_delarg, transform_setcmd)
(transform_setarg): New constants.
(struct transform_node): New fields: progmod, v.val, v.arg_end.
(struct rush_request): New field: prog.
(PROGFILE): New macro.
2009-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
Fix use of index in map[] instruction
2009-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
Fix word splitting.
* src/argcv.h, src/argcv.c: Move to lib.
* lib/argcv.h (ARGCV_WS, ARGCV_QUOTE, ARGCV_RETURN_DELIMS):
New defines.
* lib/argcv.c: Implement more flags to control the word splitter
behavior.
* lib/Makefile.am (librush_a_SOURCES): Add argcv.[ch]
* src/config.c (_parse_map_ar): Allocate memory for defval.
* src/map.c (map_string): Strip off trailing newline before
parsing the buffer.
2009-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
Implement `map' transformations (follow-up).
* gnulib.modules: Add getline and obstack.
* src/Makefile.am (rush_SOURCES): Add map.c
* src/map.c: New file.
* src/cfck.c (cfck_keyword): Remove 2nd argument.
* src/config.c (parse_strv): Remove.
(struct stmt_env): New data type.
(parse_neg_strv): New function.
(_parse_map_ar): New function.
(TOK_ARGN,TOK_DFLN): New defines.
(struct token.parses): Change proto. All _parse_.* functions
updated.
(toktab): Update flags. New command word "map".
(parse_input_buf): Update use of token.parses. Handle TOK_ARGN.
* src/rush.c (run_transforms): Handle transform_map case.
(run_rule): Add typecast.
* src/rush.h (struct rush_map): New data type.
(transform_map): New transform type.
(struct transform_node): Replace "trans" with union.
(debug6): Fix definition.
(debug7): New macro.
(cfck_keyword): Takes 1 argument.
(map_string): New prototype.
* src/rushlast.c, src/rushopt.opt, src/rushwho.c: Minor fixes.
2009-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
Implement `map' transformations.
* gnulib.modules: Add getline and obstack.
* src/Makefile.am (rush_SOURCES): Add map.c
* src/map.c: New file.
* src/cfck.c (cfck_keyword): Remove 2nd argument.
* src/config.c (parse_strv): Remove.
(struct stmt_env): New data type.
(parse_neg_strv): New function.
(_parse_map_ar): New function.
(TOK_ARGN,TOK_DFLN): New defines.
(struct token.parses): Change proto. All _parse_.* functions
updated.
(toktab): Update flags. New command word "map".
(parse_input_buf): Update use of token.parses. Handle TOK_ARGN.
* src/rush.c (run_transforms): Handle transform_map case.
(run_rule): Add typecast.
* src/rush.h (struct rush_map): New data type.
(transform_map): New transform type.
(struct transform_node): Replace "trans" with union.
(debug6): Fix definition.
(debug7): New macro.
(cfck_keyword): Takes 1 argument.
(map_string): New prototype.
* src/rushlast.c, src/rushopt.opt, src/rushwho.c: Minor fixes.
2009-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
Initial implementation of "interactive" mode.
* src/config.c (_parse_interactive): New function.
(toktab): New token "interactive".
* src/rush.c (rush_interactive_shell): New variable.
(main): Use rush_interactive_shell as the command, if -c is
not given.
* src/rush.h (rush_interactive_shell): New declaration.
2009-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.15
* NEWS: Version 1.15
* configure.ac: Likewise.
* bootstrap.conf: Remove SKIP_PO setting. The TP URL is
operational now.
* doc/gendocs_template: Mark as a GNU project.
* doc/rush.texi: Change bug-reporting email.
* gnulib.modules: Remove progname.
* lib/progname.c: Provide own version of the progname module.
* lib/Makefile.am (librush_a_SOURCES): Add progname.c
* lib/librush.h (program_name): New global decl.
(rush_set_program_name): New proto.
* src/rush.h: Remove progname.h
* src/rush.c (main): Use rush_set_program_name.
* src/rushlast.c: Likewise.
* src/rushwho.c: Likewise.
2009-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes.
* README, doc/rush.texi: Update.
* configure.ac: Allow relative file name as an
argument to --with-default-config.
* confpaths.h.in: Remove.
* gnulib.modules: Add progname
* lib/librush.h: Include unistd.h
* src/Makefile.am (LDADD): Add @LTLIBINTL@
* src/defconf.sed: Bugfix.
* src/rush.c (main): Use set_program_name
* src/rushwho.c: Likewise.
* src/rushlast.c: Likewise.
* src/socket.c: Move network-related includes to rush.h
2009-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
Rush is dubbed GNU software
Change documentation license to GFDLv1.3+
2009-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
Finish 1.4.90
* NEWS: Update.
* README: Update.
* configure.ac: New option --with-default-config
* doc/rush.texi: Update.
* src/.gitignore: Add rlopt.h, rushopt.h and rwopt.h
* src/Makefile.am (EXTRA_DIST): Add defconf.sed
(BUILT_SOURCES): Add rwopt.h and rlopt.h
(defines.h): Define RUSH_DEFAULT_CONFIG, if requested by
--with-default-config.
* src/config.c (init_input_buf): Do not abort on unexisting
file, if RUSH_DEFAULT_CONFIG is defined.
(include-safety): Rename include-security.
(parse_config): Add debug diagnostics.
* src/rushopt.opt: Rename --safety-check to --security-check.
New option --show-default.
2009-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
Add missing files
2009-01-12 Sergey Poznyakoff <gray@gnu.org.ua>
Redo option parsing.
* src/getopt.m4: New file.
* src/rlopt.opt: New file.
* src/rushopt.opt: New file.
* src/rwopt.opt: New file.
* src/Makefile.am (EXTRA_DIST): Add getopt.m4, *.opt
(rush_SOURCES): Add rushopt.h
(rushwho_SOURCES): Add rwopt.h
(rushlast_SOURCES): Add rlopt.h
(MAINTAINER_CLEANFILES): Add rushopt.h, rwopt.h, rlopt.h
(.opt.h): New rule.
* src/config.c (check_dir): Fix diagnostic messages.
(toktab): Rename config-safety to include-safety
* src/rush.c, src/rushlast.c, src/rushwho.c: Redo option parsing.
* NEWS: Update.
2009-01-11 Sergey Poznyakoff <gray@gnu.org.ua>
Implement configuration file safety checks.
* gnulib.modules (argmatch,dirname): New modules.
* src/cfck.c: New file.
* src/Makefile.am (rush_SOURCES): Add cfck.c
* src/config.c (init_input_buf): Call check_config_permissions
(_parse_include): Store NULL into ret_buf, if the file does
not exist.
(_parse_config_safety): New function.
(toktab): New statement "config-safety"
(parse_input_buf): Do not reset the input buf, if ret_buf is NULL.
* src/rush.c: New option --safety-check (-C)
* src/rush.h (RUSH_CHK_.*): New defines.
(check_config_permissions,cfck_keyword): New prototypes.
2009-01-11 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs
2009-01-10 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes.
* src/rush-po.awk: New file.
* src/Makefile.am (pkgdata_DATA): Add rush-po.awk
* NEWS, doc/rush.texi: Update docs.
* src/config.c (toktab): Fix flags of several statements.
* lib/librush.h, src/Makefile.am, src/rush.c, src/rush.h
src/rushlast.c, src/rushwho.c: Update copyright years.
2009-01-10 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes.
* src/config.c (free_input_buf): Avoid freeing ibuf->file,
which remains
used by node structures.
(_parse_locale): Allow for empty locale value.
* src/rush.c: Minor fixes.
(run_rule): Form environment before eventually printing error_msg.
* src/rushlast.c, src/rushwho.c: Fix typos.
2009-01-09 Sergey Poznyakoff <gray@gnu.org.ua>
Rewrite support for file inlcusion.
* src/config.c: Rewrite support for file inlcusion.
Files can be included at any point.
2009-01-07 Sergey Poznyakoff <gray@gnu.org.ua>
Implement I18n.
* lib/i18n.c: New file.
* Makefile.am: Add po.
* po: New directory
* po/POTFILES.in: New file.
* bootstrap.conf: Add i18n.
* configure.ac: Check for gettext.
* gnulib.modules: Add gettext-h
* lib/Makefile.am (librush_a_SOURCES): Add i18n.c
* librush.h: Include gettext.h
(_,N_): New macros.
(RUSH_ARG_UNUSED, RUSH_PRINTFLIKE): New macros.
(rush_i18n_init, user_gettext): New prototypes.
* lib/readfmt.c: Include librush.h
Add nls markers.
* lib/rushdb.c, lib/version.c, src/config.c, src/limits.c,
src/rushlast.c, src/rushwho.c, src/socket.c, src/transform.c:
Add nls markers
* src/rush.c: Add nls markers
(rush_pw): New global.
(die): Take an extra argument. Use user_gettext to
translate user message.
(make_file_name): New function.
(run_rule): Copy i18n to the request.
(main): Save struct passwd in rush_pw.
* src/rush.h (struct rush_i18n): New structure.
(struct rush_rule, rush_request): New member i18n.
(rush_pw): New global.
(die): Change prototype.
(make_file_name, expand_tilde): New prototypes.
2008-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.4.90
* NEWS, configure.ac: Version 1.4.90
* doc/rush.texi: Document notification
* src/rush.c (run_rule): Non-empty post-sockaddr implies
`fork on'.
2008-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
Socket notification: switch to TCPMUX protocol.
* src/config.c (_parse_post_socket): Use tcpmux service by
default.
* src/socket.c: Use TCPMUX protocol.
2008-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
Initial implementation of socket notification interface.
* src/socket.c: New file.
* src/Makefile.am: Add socket.c
* src/config.c: New statement `post-socket'.
* src/rush.c (struct rush_request): Move to rush.h
(fork_process): Run post_socket_send, if post_sockaddr is given.
(run_rule): Propagate post_sockaddr.
(main): Minor fix.
* src/rush.h (struct rush_request): Moved from rush.c; New member
post_sockaddr.
(struct rush_sockaddr): New structure.
(struct rush_rule): New member post_sockaddr.
(post_socket_send): New proto.
2008-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.4
2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes.
* src/rushlast.c: Format preferences: command line option,
RUSHLAST_FORMAT env. variable, default format.
* src/rushwho.c: Format preferences: command line option,
RUSHWHO_FORMAT env. variable, default format.
* doc/rush.texi: Mention RUSHLAST_FORMAT and RUSHWHO_FORMAT vars.
2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix
Fix direntry references
2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
Update
2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.3
* Makefile.am (DISTCLEANFILES, EXTRA_DIST): Remove.
* NEWS: Version 1.3
* configure.ac: Version 1.3
* doc/rush.texi (direntry): Fixed.
Add missing opindexes. Arrange option tables in a
traditional manner (short options first).
* lib/rushdb.c (output_duration): Fix indentation.
(format_pid): Fix size of buf.
* src/Makefile.am (INCLUDES): Fix.
* src/rush.c: Remove isatty restriction.
2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
Minor improvement
* doc/rush.texi: Document --user option.
* src/rush.c: Support all options only if invoked from a tty,
otherwise
support only -c.
2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix.
* doc/rush.texi: Various fixes.
* src/rush.c: Implement --user (-u) option.
2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
Rearrange the docs
2008-10-13 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes.
* lib/rushdb.c (output_duration): Minor fix in width calculation.
* doc/rush.texi: Added missing sections. Spell checked.
2008-10-12 Sergey Poznyakoff <gray@gnu.org.ua>
Various improvements.
* gnulib.modules: Add error.
* lib/readfmt.c: New file.
* lib/Makefile.am (librush_a_SOURCES): Add readfmt.c
* lib/librush.h (rush_read_format): New prototype.
* lib/rushdb.c: Fix indentation.
Allow to use quoted strings and escapes inside forms.
Ignore explicit newlines.
* lib/wtmp.c (rush_wtmp_copy): Copy pid.
* src/rushlast.c: Use error instead of fprintf to stderr.
Accept --format=@file.
Fix default output format.
* src/rushwho.c: Likewise.
* doc/rush.texi: Document rushlast and rushwho
* doc/strftime.texi: New file.
* doc/Makefile.am (rush_TEXINFOS): Add strftime.texi
2008-10-12 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes
* doc/rush.texi: Document forked mode.
* lib/rushdb.c (output_duration): Honor width.
(rushdb_compile_format): Use xzalloc to create new form.
* src/rushwho.c: Change default format.
2008-10-12 Sergey Poznyakoff <gray@gnu.org.ua>
Implement acct db locking.
* gnulib.modules: Add vasprintf
* lib/librush.h (rush_utmp_lock_all)
(rush_utmp_unlock_all,rushdb_lock,rushdb_unlock): New functions.
* lib/rushdb.c (rushdb_lock,rushdb_unlock): New functions.
(rushdb_start): Lock utmp for writing.
* lib/utmp.c (rush_utmp_write): Lock affected record for writing.
(rush_utmp_lock_all,rush_utmp_unlock_all): New functions.
* lib/wtmp.c (rush_wtmp_append): Lock affected record for writing.
2008-10-12 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix
2008-10-12 Sergey Poznyakoff <gray@gnu.org.ua>
Finish rushlast and rushwho.
* lib/librush.h (RUSH_UTMP_NAME, RUSH_WTMP_NAME): New defines,
instead of _SUF counterparts.
(enum rushdb_result, enum rush_wtmp_dir): new constants.
(rush_wtmp_set_dir, rush_wtmp_rewind): New functions.
(rush_wtmp_read, rush_utmp_read): Return enum rushdb_result.
(rushdb_backward_direction): New function.
* lib/rushdb.c (format_error): New function
(rushdb_open): Return enum rushdb_result.
(rushdb_backward_direction): New function.
(format_stop): Correctly handle empty stop date.
(rushdb_compile_format): Make sure time formats have correct
widths.
* lib/utmp.c (rush_utmp_read0, rush_utmp_read): Change return
value.
* lib/wtmp.c (rush_wtmp_dir): New variable.
(rush_wtmp_rewind): New function.
(rush_wtmp_read): Rewrite to be able to scan the file in both
directions.
(rush_wtmp_update,rush_wtmp_update): Likewise.
* src/limits.c: Use RUSH_DB_FILE, handle new return type from
rushdb_open.
* src/rush.c: Likewise.
* src/rush.h (RUSH_DB_FILE): Rename to RUSH_DB.
* src/rushlast.c: Implement new options. Show records in reverse
chronological
order by default.
* src/rushwho.c: Implement new options.
2008-10-11 Sergey Poznyakoff <gray@gnu.org.ua>
Implement accounting (in forked mode only).
* paths, acinclude.m4, lib/logwtmp.c,
lib/utmp_init.c, lib/utmp_logout.c: Delete
* src/slist.c: Move to lib/slist.c
* configure.ac: Remove utmp stuff
* gnulib.modules (readutmp): Remove
(fprintftime): Add
* lib/Makefile.am: Add new files.
* src/.gitignore: Add rushlast, rushwho and .gdbinit
* src/Makefile.am (bin_PROGRAMS): New var. Add rushlast and
rushwho.
(rush_SOURCES): Remove slist.c
(defines.h): Define LOCALSTATEDIR
* src/config.c (new_rush_rule): Init acct and mask members.
(_parse_acct): New function.
* src/limits.c (check_logins): Use rushdb, instead of the system
utmp/wtmp.
* src/rush.c (struct rush_request): new members: umask, home_dir,
acct.
(acct_on, acct_off): New functions.
(fork_process): Run accounting, if requested.
(run_rule): Save chroot_dir, umask and acct in the struct
rush_request.
Always do chroot only once.
(version): Remove. Implemented in lib/version.c
(main): Initialize new members in req.
* src/rush.h: Add new includes.
(RUSH_DB_FILE): New define.
(slist_t, slist_append, slist_create)
(slist_reduce, slist_free): Remove.
(struct rush_rule): New member `acct'.
(NO_UMASK): New define.
2008-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
Add framework for updating wtmp/utmp
2008-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
Implement 'forked mode'
* gnulib.modules: Add inttostr.
* src/config.c (new_rush_rule): Initialize p->fork
(get_bool, _parse_fork): New functions.
(toktab): New statement "fork".
(parse_input_buf): If a rule is not tagged set
its tag to #NUM, where NUM is its number.
* src/rush.c (struct rush_request): New member: fork.
(fork_process): New function.
(run_rule): Call fork_process if fork is true.
(all functions): Use rule->tag freely, it can't be NULL.
* src/rush.h: include <inttostr.h>
(enum rush_three_state): New type.
(struct rush_rule): Remove const from tag;
New members: fork, prologue, epilogue.
2008-10-06 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix
2008-09-06 Sergey Poznyakoff <gray@gnu.org.ua>
Release 1.2
* NEWS, configure.ac: Version 1.2
* doc/rush.texi: Proof-read.
2008-09-05 Sergey Poznyakoff <gray@gnu.org.ua>
Implement a test mode.
* NEWS: Document test mode.
* doc/rush.texi: Document test mode.
* src/config.c (_parse_debug): Command line settings override
the configuration
file.
* src/rush.c (debug_option): New global.
(run_rule): Exit instead of executing the command, if lint_option
is set.
(longopts): New option --test, an alias for -t.
(help): Improve help output.
(usage): New function.
(main): Implement full-fledged test mode.
2008-09-05 Sergey Poznyakoff <gray@gnu.org.ua>
Implement command line options for testing configuration files.
* NEWS, configure.ac: version 1.1.90.
* gnulib.modules: Add getopt.
* src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Remove.
* src/config.c (init_input_buf): Report ENOENT as error if
lint_option is set.
(parse_config): Use rush_config_file.
(all funcs): Replace calls to syslog with logmsg.
* src/limits.c: Replace calls to syslog with logmsg.
* src/rush.h: Likewise.
* src/rush.c: Include getopt.h
(rush_config_file, lint_option): New globals.
(vlogmsg, logmsg): New functions.
(die): Rewrite using vlogmsg. Do not print error_msg if
lint_option is set.
(main): Handle new command line options.
2008-08-30 Sergey Poznyakoff <gray@gnu.org.ua>
Finish release 1.1
* NEWS, configure.ac: version 1.1
* doc/rush.texi: Updated.
* src/config.c (_parse_command, _parse_match): Use global
regex flags.
(_parse_re_flags): New function.
(toktab): New statement `regexp'.
2008-08-29 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes.
* doc/rush.texi: Spell check.
2008-08-29 Sergey Poznyakoff <gray@gnu.org.ua>
Fix typos
Update docs and examples
Update docs and examples
Update docs
2008-08-28 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes.
* doc/rush.texi: Write `git' section.
2008-08-28 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes.
* src/rush.c (send_msg): First try to send message to stderr
and fall back to stdout if this fails.
* doc/rush.texi: Guidelines for further improvements.
2008-08-28 Sergey Poznyakoff <gray@gnu.org.ua>
Introduce exit rules.
* src/config.c (copy_string): Force terminating newline.
(_parse_exit): New function.
(toktab): New keyword "exit".
* src/rush.c (expand_tilde): Shut GCC warnings.
(run_rule): Support `exit' rules.
* src/rush.h (getmaxfd): New define.
(struct rush_rule): New members error_msg and error_fd.
(die): Mark with ATTRIBUTE_NORETURN.
* NEWS: Version number 1.0.90. Document new features.
* configure.ac: Check for sysconf and getdtablesize.
Raise version number to 1.0.90.
* doc/rush.texi: Document new features.
* etc/rush.rc: Improve.
2008-08-28 Sergey Poznyakoff <gray@gnu.org.ua>
Introduce negated conditions.
* src/config.c (_parse_negation): New function.
(_parse_command, _parse_match, _parse_argc, _parse_uid,
_parse_gid)
(_parse_user, _parse_group): Handle negation operator.
* src/rush.c (run_tests): Handle negation.
* src/rush.h (struct test_arg_node): New member `negate'.
* doc/rush.texi (Conditions): Document condition negation.
* NEWS: Update
2008-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs
2008-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
Run command line transformations sequentially.
* src/config.c (_parse_transform, _parse_transform_ar): Use
new transform
node structure.
* src/rush.c (run_transforms, rebuild_cmdline, reparse_cmdline):
New functions.
(run_rule): Run all transformations sequentially, in the order
of their
appearance in the configuration file.
* src/rush.h (struct transform_node, enum transform_node_type):
New data types.
(struct rush_rule): Remove trans, arg_head, arg_tail.
(transform_head, transform_tail): New members.
2008-08-26 Sergey Poznyakoff <gray@gnu.org.ua>
Release 1.0
Update docs
Add doc/.gitignore
2008-08-26 Sergey Poznyakoff <gray@gnu.org.ua>
Change bug-reporting email.
* NEWS:
* README:
* README-alpha:
* configure.ac:
* doc/rush.texi:
2008-08-26 Sergey Poznyakoff <gray@gnu.org.ua>
Improve configuration syntax.
* src/argcv.c (argcv_string): Remove const specifier from the
2nd arg.
* src/argcv.h: Likewise.
* src/config.c: Improve the syntax. Introduce fall-through
statement.
Remove the default_entry, it can be provided using
RUSH_DEFAULT_CONFIG
define and an external file.
* src/limits.c: Renumber debug levels.
* src/rush.c: Support fall-through rules.
* src/rush.h (struct command_config): Rename to rush_rule. All
uses updated.
(config_list, config_tail): Rename to rule_head, rule_tail,
correspondingly.
* etc/rush.rc: Use new syntax.
* doc/rush.texi: Update.
2008-08-26 Sergey Poznyakoff <gray@gnu.org.ua>
Code cleanup.
* src/config.c: Rewrite using table-driven parser.
2008-08-26 Sergey Poznyakoff <gray@gnu.org.ua>
Rewrite look ups in config file in a more logical manner.
* src/rush.h (struct match_arg): Remove.
(enum test_type, struct test_numeric_node, struct test_arg_node)
(struct test_node): New data types.
(struct command_config): Remove regex, match_head, match_tail,
argc,
cmp_op, users, groups, min_uid.
New members: test_head, test_tail
* src/config.c (parse_input_buf): Reflect changes to struct
command_config.
* src/rush.c (run_tests, test_request_cmdline, test_request_arg)
(test_request_argc, test_request_uid, test_request_gid,
test_request_group)
(test_request_user): New functions.
(run_tests): New function.
(match_config): Rewrite using run_tests.
2008-08-26 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix.
* run_config: Set umask as late as possible. Provide a reasonable
default in case it is not set in the config.
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Discern config entries based on user/group name.
* src/config.c: New keywords: users and groups.
* src/rush.c (match_config): Take an additional argument (all uses
updated). Compare username and groups.
* src/rush.h: Include grp.h
(struct command_config): New members: users and groups.
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes.
* Makefile.am: Add distuninstallcheck_listfiles.
* etc/rush.rc: Update.
* src/config.c (read_line): Fix keeping track of input line
number.
(check_dir): Avoid checks for existency of ~-directories.
(parse_input_buf): Don't check for home dir presence, if
chroot was
requested.
* src/rush.c (run_config): Remove implicit / home.
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Improve docs
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Provide a documentation framework.
* doc/Makefile.am: New file.
* doc/fdl.texi: New file.
* doc/gendocs_template: New file.
* doc/rendition.texi: New file.
* doc/rush.info: New file.
* doc/rush.texi: New file.
* Makefile.am (SUBDIRS): Add doc.
* configure.ac: Add doc.
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Provide a way for modifying program environment.
* src/config.c (new_command_config): Set default env.
(parse_input_buf): New keyword env.
* src/rush.c (run_config): Tailor environment before running
the command.
* src/rush.h (struct command_config): New member env.
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Add default configuration file.
* etc/Makefile.am: New file.
* etc/rush.rc: New file.
* Makefile.am (SUBDIRS): Add etc
* configure.ac: Add etc.
2008-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Update .gitignore's
Add rules for generating ChangeLog
Add .gitignore's
Initial import
Local Variables:
mode: change-log
version-control: never
buffer-read-only: t
End:
|