pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: ACL debug, NFS gcc build torture tests+misc, 2024-06-22
Posted by Anonymous on Sat 22nd Jun 2024 14:41
raw | new post

  1. From bbc56c7eed9a705359264ad7f86791d199528869 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Fri, 21 Jun 2024 12:13:51 +0200
  4. Subject: [PATCH 1/5] daemon: Improve ACL debug code
  5.  
  6. Improve ACL debug code
  7.  
  8. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  9. ---
  10. daemon/acl.c | 14 ++++++--------
  11.  1 file changed, 6 insertions(+), 8 deletions(-)
  12.  
  13. diff --git a/daemon/acl.c b/daemon/acl.c
  14. index 7ebc8ab..ffb8d6c 100644
  15. --- a/daemon/acl.c
  16. +++ b/daemon/acl.c
  17. @@ -768,16 +768,18 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  18.  
  19.      DPRINTF(ACLLVL, ("--> map_nfs4ace_who(sid=0x%p,owner_sid=0x%p, group_sid=0x%p)\n"));
  20.  
  21. +    if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  22. +        print_sid("sid", sid);
  23. +        print_sid("owner_sid", owner_sid);
  24. +        print_sid("group_sid", group_sid);
  25. +    }
  26. +
  27.      /* for ace mapping, we want to map owner's sid into "owner@"
  28.       * but for set_owner attribute we want to map owner into a user name
  29.       * same applies to group
  30.       */
  31.      status = 0;
  32.      if (owner_sid) {
  33. -        if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  34. -            print_sid("owner_sid", owner_sid);
  35. -        }
  36. -
  37.          if (EqualSid(sid, owner_sid)) {
  38.              DPRINTF(ACLLVL, ("map_nfs4ace_who: this is owner's sid\n"));
  39.              memcpy(who_out, ACE4_OWNER, strlen(ACE4_OWNER)+1);
  40. @@ -787,10 +789,6 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  41.          }
  42.      }
  43.      if (group_sid) {
  44. -        if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  45. -            print_sid("group_sid", group_sid);
  46. -        }
  47. -
  48.          if (EqualSid(sid, group_sid)) {
  49.              DPRINTF(ACLLVL, ("map_nfs4ace_who: this is group's sid\n"));
  50.              memcpy(who_out, ACE4_GROUP, strlen(ACE4_GROUP)+1);
  51. --
  52. 2.45.1
  53.  
  54. From 7b3aa5d9596103e558061885f27bd5437ad994a3 Mon Sep 17 00:00:00 2001
  55. From: Roland Mainz <roland.mainz@nrubsig.org>
  56. Date: Sat, 22 Jun 2024 11:51:16 +0200
  57. Subject: [PATCH 2/5] daemon: |is_well_known_sid()| should return
  58.  |SID_NAME_USE| for |WinCreator*|&co.
  59.  
  60. |is_well_known_sid()| should return |SID_NAME_USE| for |WinCreatorOwnerSid|,
  61. |WinCreatorGroupSid| etc.
  62.  
  63. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  64. ---
  65. daemon/acl.c | 18 +++++++++++-------
  66.  1 file changed, 11 insertions(+), 7 deletions(-)
  67.  
  68. diff --git a/daemon/acl.c b/daemon/acl.c
  69. index ffb8d6c..0300e6b 100644
  70. --- a/daemon/acl.c
  71. +++ b/daemon/acl.c
  72. @@ -37,6 +37,7 @@
  73.  #include "sid.h"
  74.  
  75.  #define ACLLVL 2 /* dprintf level for acl logging */
  76. +#define ACLLVL2 3 /* dprintf level for acl logging */
  77.  
  78.  /* Local prototypes */
  79.  static void map_winace2nfs4aceflags(BYTE win_aceflags, uint32_t *nfs4_aceflags);
  80. @@ -453,7 +454,7 @@ out:
  81.      return status;
  82.  }
  83.  
  84. -static int is_well_known_sid(PSID sid, char *who)
  85. +static int is_well_known_sid(PSID sid, char *who, SID_NAME_USE *snu_out)
  86.  {
  87.      int status, i;
  88.      for (i = 0; i < 78; i++) {
  89. @@ -464,19 +465,23 @@ static int is_well_known_sid(PSID sid, char *who)
  90.              switch((WELL_KNOWN_SID_TYPE)i) {
  91.              case WinCreatorOwnerSid:
  92.                  memcpy(who, ACE4_OWNER, strlen(ACE4_OWNER)+1);
  93. +                *snu_out = SidTypeUser;
  94. +                return TRUE;
  95. +            case WinCreatorGroupSid:
  96. +            case WinBuiltinUsersSid:
  97. +                memcpy(who, ACE4_GROUP, strlen(ACE4_GROUP)+1);
  98. +                *snu_out = SidTypeGroup;
  99.                  return TRUE;
  100.              case WinNullSid:
  101.                  memcpy(who, ACE4_NOBODY, strlen(ACE4_NOBODY)+1);
  102. +                *snu_out = SidTypeUser;
  103.                  return TRUE;
  104.              case WinAnonymousSid:
  105.                  memcpy(who, ACE4_ANONYMOUS, strlen(ACE4_ANONYMOUS)+1);
  106.                  return TRUE;
  107.              case WinWorldSid:
  108.                  memcpy(who, ACE4_EVERYONE, strlen(ACE4_EVERYONE)+1);
  109. -                return TRUE;
  110. -            case WinCreatorGroupSid:
  111. -            case WinBuiltinUsersSid:
  112. -                memcpy(who, ACE4_GROUP, strlen(ACE4_GROUP)+1);
  113. +                *snu_out = SidTypeGroup;
  114.                  return TRUE;
  115.              case WinAuthenticatedUserSid:
  116.                  memcpy(who, ACE4_AUTHENTICATED, strlen(ACE4_AUTHENTICATED)+1);
  117. @@ -797,11 +802,10 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  118.              goto out;
  119.          }
  120.      }
  121. -    status = is_well_known_sid(sid, who_out);
  122. +    status = is_well_known_sid(sid, who_out, &sid_type);
  123.      if (status) {
  124.          if (!strncmp(who_out, ACE4_NOBODY, strlen(ACE4_NOBODY))) {
  125.              who_size = (DWORD)strlen(ACE4_NOBODY);
  126. -            sid_type = SidTypeUser;
  127.              goto add_domain;
  128.          }
  129.  
  130. --
  131. 2.45.1
  132.  
  133. From 8c8f5e22415f1ed6d3549ddfda119d96e61200b9 Mon Sep 17 00:00:00 2001
  134. From: Roland Mainz <roland.mainz@nrubsig.org>
  135. Date: Sat, 22 Jun 2024 11:56:47 +0200
  136. Subject: [PATCH 3/5] daemon: Better debug output for |map_dacl_2_nfs4acl()|
  137.  
  138. Add better debug output for |map_dacl_2_nfs4acl()|
  139.  
  140. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  141. ---
  142. daemon/acl.c          | 41 +++++++++++++---------
  143.  daemon/daemon_debug.c | 82 +++++++++++++++++++++++++++++++++++++++++++
  144.  daemon/daemon_debug.h |  3 ++
  145.  3 files changed, 110 insertions(+), 16 deletions(-)
  146.  
  147. diff --git a/daemon/acl.c b/daemon/acl.c
  148. index 0300e6b..b42d638 100644
  149. --- a/daemon/acl.c
  150. +++ b/daemon/acl.c
  151. @@ -975,20 +975,6 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  152.              map_winaccessmask2nfs4acemask(win_mask,
  153.                  file_type, &nfs4_acl->aces[i].acemask);
  154.  
  155. -            if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  156. -                dprintf_out("win2nfs: nfs4_acl->aces[%d].who='%s', "
  157. -                    "acetype='%s', "
  158. -                    "win_mask=0x%lx, nfs_acemask=0x%lx\n",
  159. -                    i, nfs4_acl->aces[i].who,
  160. -                    (nfs4_acl->aces[i].acetype?
  161. -                        "DENIED ACE":"ALLOWED ACE"),
  162. -                    (long)win_mask, (long)nfs4_acl->aces[i].acemask);
  163. -                print_windows_access_mask(nfs4_acl->aces[i].who,
  164. -                    win_mask);
  165. -                print_nfs_access_mask(nfs4_acl->aces[i].who,
  166. -                    nfs4_acl->aces[i].acemask);
  167. -            }
  168. -
  169.              /*
  170.               * Treat |SidTypeAlias| as (local) group
  171.               *
  172. @@ -1001,13 +987,36 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  173.               */
  174.              if ((who_sid_type == SidTypeGroup) ||
  175.                  (who_sid_type == SidTypeAlias)) {
  176. -                DPRINTF(ACLLVL, ("map_dacl_2_nfs4acl: who_sid_type=%d: "
  177. +                DPRINTF(ACLLVL, ("map_dacl_2_nfs4acl: who_sid_type='%s': "
  178.                      "aces[%d].who='%s': "
  179.                      "setting group flag\n",
  180. -                    (int)who_sid_type,
  181. +                    map_SID_NAME_USE2str(who_sid_type),
  182.                      i, nfs4_acl->aces[i].who));
  183.                  nfs4_acl->aces[i].aceflag |= ACE4_IDENTIFIER_GROUP;
  184.              }
  185. +
  186. +            if (DPRINTF_LEVEL_ENABLED(0)) {
  187. +                dprintf_out("win2nfs: nfs4_acl->aces[%d]=(who='%s', "
  188. +                    "acetype='%s', "
  189. +                    "aceflag='%s'/0x%lx, "
  190. +                    "acemask='%s'/0x%lx(=win_mask=0x%lx)), "
  191. +                    "who_sid_type='%s'\n",
  192. +                    i,
  193. +                    nfs4_acl->aces[i].who,
  194. +                    map_nfs_acetype2str(nfs4_acl->aces[i].acetype),
  195. +                    nfs_aceflag2shortname(nfs4_acl->aces[i].aceflag),
  196. +                    nfs4_acl->aces[i].aceflag,
  197. +                    nfs_mask2shortname(nfs4_acl->aces[i].acemask),
  198. +                    (long)nfs4_acl->aces[i].acemask,
  199. +                    (long)win_mask,
  200. +                    map_SID_NAME_USE2str(who_sid_type));
  201. +                if (DPRINTF_LEVEL_ENABLED(ACLLVL2)) {
  202. +                    print_windows_access_mask(nfs4_acl->aces[i].who,
  203. +                        win_mask);
  204. +                    print_nfs_access_mask(nfs4_acl->aces[i].who,
  205. +                        nfs4_acl->aces[i].acemask);
  206. +                }
  207. +            }
  208.          }
  209.      }
  210.      status = ERROR_SUCCESS;
  211. diff --git a/daemon/daemon_debug.c b/daemon/daemon_debug.c
  212. index 9d555e1..ad685ce 100644
  213. --- a/daemon/daemon_debug.c
  214. +++ b/daemon/daemon_debug.c
  215. @@ -660,6 +660,25 @@ const char* gssauth_string(int type) {
  216.      return "<invalid RPCSEC_SSPI_* gss auth type>";
  217.  }
  218.  
  219. +const char* map_SID_NAME_USE2str(SID_NAME_USE snu)
  220. +{
  221. +    switch(snu) {
  222. +#define SID_NAME_USE_TO_STRLITERAL(e) case e: return #e;
  223. +        SID_NAME_USE_TO_STRLITERAL(SidTypeUser)
  224. +        SID_NAME_USE_TO_STRLITERAL(SidTypeGroup)
  225. +        SID_NAME_USE_TO_STRLITERAL(SidTypeDomain)
  226. +        SID_NAME_USE_TO_STRLITERAL(SidTypeAlias)
  227. +        SID_NAME_USE_TO_STRLITERAL(SidTypeWellKnownGroup)
  228. +        SID_NAME_USE_TO_STRLITERAL(SidTypeDeletedAccount)
  229. +        SID_NAME_USE_TO_STRLITERAL(SidTypeInvalid)
  230. +        SID_NAME_USE_TO_STRLITERAL(SidTypeUnknown)
  231. +        SID_NAME_USE_TO_STRLITERAL(SidTypeComputer)
  232. +        SID_NAME_USE_TO_STRLITERAL(SidTypeLabel)
  233. +        SID_NAME_USE_TO_STRLITERAL(SidTypeLogonSession)
  234. +    }
  235. +    return "<unknown SID_NAME_USE type>";
  236. +}
  237. +
  238.  const char *FILE_INFORMATION_CLASS2string(int fic)
  239.  {
  240.      switch(fic) {
  241. @@ -911,6 +930,69 @@ void print_nfs_access_mask(const char *label, uint32_t nfs_mask)
  242.      dprintf_out("<-- print_nfs_access_mask\n");
  243.  }
  244.  
  245. +const char *nfs_mask2shortname(uint32_t nfs_mask)
  246. +{
  247. +    /*
  248. +     * |snam_buffer| - per thread buffer, we assume that
  249. +     * the caller will not use the function multiple times
  250. +     * in one |dprintf_out()|
  251. +     */
  252. +    __declspec(thread) static char snam_buffer[128];
  253. +    char *sb = snam_buffer;
  254. +    sb[0] = '\0';
  255. +#define WRITENFSMASKBITS(mflag, shortname) \
  256. +    if (nfs_mask & (mflag)) { \
  257. +        if (sb != snam_buffer) { \
  258. +            *sb++ = ','; \
  259. +        } \
  260. +        sb = stpcpy(sb, (shortname)); \
  261. +    }
  262. +    WRITENFSMASKBITS(ACE4_READ_DATA,            "RD");
  263. +    WRITENFSMASKBITS(ACE4_WRITE_DATA,           "WD");
  264. +    WRITENFSMASKBITS(ACE4_APPEND_DATA,          "AD");
  265. +    WRITENFSMASKBITS(ACE4_READ_NAMED_ATTRS,     "REA");
  266. +    WRITENFSMASKBITS(ACE4_WRITE_NAMED_ATTRS,    "WEA");
  267. +    WRITENFSMASKBITS(ACE4_EXECUTE,              "X");
  268. +    WRITENFSMASKBITS(ACE4_DELETE_CHILD,         "DC");
  269. +    WRITENFSMASKBITS(ACE4_READ_ATTRIBUTES,      "RA");
  270. +    WRITENFSMASKBITS(ACE4_WRITE_ATTRIBUTES,     "RA");
  271. +    WRITENFSMASKBITS(ACE4_DELETE,               "DE");
  272. +    WRITENFSMASKBITS(ACE4_READ_ACL,             "RACL");
  273. +    WRITENFSMASKBITS(ACE4_WRITE_ACL,            "WACL");
  274. +    WRITENFSMASKBITS(ACE4_WRITE_OWNER,          "WO");
  275. +    WRITENFSMASKBITS(ACE4_SYNCHRONIZE,          "S");
  276. +
  277. +    return snam_buffer;
  278. +}
  279. +
  280. +const char *nfs_aceflag2shortname(uint32_t aceflag)
  281. +{
  282. +    /*
  283. +     * |sacf_buffer| - per thread buffer, we assume that
  284. +     * the caller will not use the function multiple times
  285. +     * in one |dprintf_out()|
  286. +     */
  287. +    __declspec(thread) static char sacf_buffer[128];
  288. +    char *sb = sacf_buffer;
  289. +    sb[0] = '\0';
  290. +#define WRITENFSACEFLAGBITS(mflag, shortname) \
  291. +    if (aceflag & (mflag)) { \
  292. +        if (sb != sacf_buffer) { \
  293. +            *sb++ = ','; \
  294. +        } \
  295. +        sb = stpcpy(sb, (shortname)); \
  296. +    }
  297. +    WRITENFSACEFLAGBITS(ACE4_FILE_INHERIT_ACE,              "(FI)");
  298. +    WRITENFSACEFLAGBITS(ACE4_DIRECTORY_INHERIT_ACE,         "(DI)");
  299. +    WRITENFSACEFLAGBITS(ACE4_NO_PROPAGATE_INHERIT_ACE,      "(NPI)");
  300. +    WRITENFSACEFLAGBITS(ACE4_INHERIT_ONLY_ACE,              "(IO)");
  301. +    WRITENFSACEFLAGBITS(ACE4_SUCCESSFUL_ACCESS_ACE_FLAG,    "(SA)");
  302. +    WRITENFSACEFLAGBITS(ACE4_FAILED_ACCESS_ACE_FLAG,        "(FA)");
  303. +    WRITENFSACEFLAGBITS(ACE4_IDENTIFIER_GROUP,              "(G)");
  304. +    WRITENFSACEFLAGBITS(ACE4_INHERITED_ACE,                 "(I)");
  305. +
  306. +    return sacf_buffer;
  307. +}
  308.  
  309.  void print_nfs41_file_info(
  310.      const char *label,
  311. diff --git a/daemon/daemon_debug.h b/daemon/daemon_debug.h
  312. index e283296..3b376f0 100644
  313. --- a/daemon/daemon_debug.h
  314. +++ b/daemon/daemon_debug.h
  315. @@ -108,6 +108,8 @@ const char *map_nfs_ftype2str(int ftype);
  316.  const char *map_nfs_acetype2str(uint32_t ace_type);
  317.  void print_windows_access_mask(const char *label, ACCESS_MASK win_mask);
  318.  void print_nfs_access_mask(const char *label, uint32_t nfs_mask);
  319. +const char *nfs_mask2shortname(uint32_t nfs_mask);
  320. +const char *nfs_aceflag2shortname(uint32_t aceflag);
  321.  void print_hexbuf_no_asci(const char *title, const unsigned char *buf, int len);
  322.  void print_hexbuf(const char *title, const unsigned char *buf, int len);
  323.  void print_create_attributes(int level, DWORD create_opts);
  324. @@ -122,6 +124,7 @@ const char* nfs_opnum_to_string(int opnum);
  325.  const char* nfs_error_string(int status);
  326.  const char* rpc_error_string(int status);
  327.  const char* gssauth_string(int type);
  328. +const char* map_SID_NAME_USE2str(SID_NAME_USE snu);
  329.  const char *FILE_INFORMATION_CLASS2string(int fic);
  330.  void print_condwait_status(int level, int status);
  331.  void print_sr_status_flags(int level, int flags);
  332. --
  333. 2.45.1
  334.  
  335. From 992460e092c1731e5824b6187934f21a3105d6e8 Mon Sep 17 00:00:00 2001
  336. From: Roland Mainz <roland.mainz@nrubsig.org>
  337. Date: Sat, 22 Jun 2024 13:58:19 +0200
  338. Subject: [PATCH 4/5] daemon: Add ACLLVL1-ACLLVL3 for more fine-grained ACL
  339.  debug outpit control
  340.  
  341. Add ACLLVL1-ACLLVL3 for more fine-grained ACL debug outpit control
  342.  
  343. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  344. ---
  345. daemon/acl.c | 84 +++++++++++++++++++++++++++-------------------------
  346.  1 file changed, 44 insertions(+), 40 deletions(-)
  347.  
  348. diff --git a/daemon/acl.c b/daemon/acl.c
  349. index b42d638..e91e831 100644
  350. --- a/daemon/acl.c
  351. +++ b/daemon/acl.c
  352. @@ -36,8 +36,10 @@
  353.  #include "nfs41_xdr.h"
  354.  #include "sid.h"
  355.  
  356. -#define ACLLVL 2 /* dprintf level for acl logging */
  357. -#define ACLLVL2 3 /* dprintf level for acl logging */
  358. +/* |DPRINTF()| levels for acl logging */
  359. +#define ACLLVL1 1
  360. +#define ACLLVL2 2
  361. +#define ACLLVL3 3
  362.  
  363.  /* Local prototypes */
  364.  static void map_winace2nfs4aceflags(BYTE win_aceflags, uint32_t *nfs4_aceflags);
  365. @@ -115,7 +117,7 @@ static int convert_nfs4acl_2_dacl(nfs41_daemon_globals *nfs41dg,
  366.      LPSTR domain = NULL;
  367.      BOOLEAN flag;
  368.  
  369. -    DPRINTF(ACLLVL, ("--> convert_nfs4acl_2_dacl(acl=0x%p,file_type='%s'(=%d))\n",
  370. +    DPRINTF(ACLLVL2, ("--> convert_nfs4acl_2_dacl(acl=0x%p,file_type='%s'(=%d))\n",
  371.          acl, map_nfs_ftype2str(file_type), file_type));
  372.  
  373.      sids = malloc(acl->count * sizeof(PSID));
  374. @@ -125,7 +127,7 @@ static int convert_nfs4acl_2_dacl(nfs41_daemon_globals *nfs41dg,
  375.      }
  376.      for (i = 0; i < acl->count; i++) {
  377.          convert_nfs4name_2_user_domain(acl->aces[i].who, &domain);
  378. -        DPRINTF(ACLLVL, ("convert_nfs4acl_2_dacl: for user='%s' domain='%s'\n",
  379. +        DPRINTF(ACLLVL2, ("convert_nfs4acl_2_dacl: for user='%s' domain='%s'\n",
  380.                  acl->aces[i].who, domain?domain:"<null>"));
  381.          status = check_4_special_identifiers(acl->aces[i].who, &sids[i],
  382.                                               &sid_len, &flag);
  383. @@ -137,7 +139,7 @@ static int convert_nfs4acl_2_dacl(nfs41_daemon_globals *nfs41dg,
  384.              bool isgroupacl = (acl->aces[i].aceflag & ACE4_IDENTIFIER_GROUP)?true:false;
  385.  
  386.              if (isgroupacl) {
  387. -                DPRINTF(ACLLVL,
  388. +                DPRINTF(ACLLVL2,
  389.                      ("convert_nfs4acl_2_dacl: aces[%d].who='%s': "
  390.                      "Setting group flag\n",
  391.                      i, acl->aces[i].who));
  392. @@ -172,7 +174,7 @@ static int convert_nfs4acl_2_dacl(nfs41_daemon_globals *nfs41dg,
  393.              map_nfs4acemask2winaccessmask(acl->aces[i].acemask,
  394.                  file_type, &mask);
  395.  
  396. -            if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  397. +            if (DPRINTF_LEVEL_ENABLED(ACLLVL1)) {
  398.                  dprintf_out("nfs2win: acl->aces[%d].who='%s': "
  399.                      "acetype='%s', "
  400.                      "nfs_acemask=0x%lx, win_mask=0x%lx, "
  401. @@ -225,7 +227,7 @@ static int convert_nfs4acl_2_dacl(nfs41_daemon_globals *nfs41dg,
  402.      *sids_out = sids;
  403.      *dacl_out = dacl;
  404.  out:
  405. -    DPRINTF(ACLLVL, ("<-- convert_nfs4acl_2_dacl("
  406. +    DPRINTF(ACLLVL2, ("<-- convert_nfs4acl_2_dacl("
  407.          "acl=0x%p,file_type='%s'(=%d)) returning %d\n",
  408.          acl, map_nfs_ftype2str(file_type), file_type, status));
  409.      return status;
  410. @@ -253,7 +255,7 @@ static int handle_getacl(void *daemon_context, nfs41_upcall *upcall)
  411.      char owner[NFS4_OPAQUE_LIMIT+1], group[NFS4_OPAQUE_LIMIT+1];
  412.      nfsacl41 acl = { 0 };
  413.  
  414. -    DPRINTF(ACLLVL, ("--> handle_getacl(state->path.path='%s')\n",
  415. +    DPRINTF(ACLLVL1, ("--> handle_getacl(state->path.path='%s')\n",
  416.          state->path.path));
  417.  
  418.      if (args->query & DACL_SECURITY_INFORMATION) {
  419. @@ -295,7 +297,7 @@ use_nfs41_getattr:
  420.           */
  421.          if ((info.attrmask.arr[1] &
  422.              (FATTR4_WORD1_OWNER|FATTR4_WORD1_OWNER_GROUP)) != (FATTR4_WORD1_OWNER|FATTR4_WORD1_OWNER_GROUP)) {
  423. -            DPRINTF(ACLLVL, ("handle_getattr: owner/owner_group not in cache, doing full lookup...\n"));
  424. +            DPRINTF(ACLLVL2, ("handle_getattr: owner/owner_group not in cache, doing full lookup...\n"));
  425.              goto use_nfs41_getattr;
  426.          }
  427.      }
  428. @@ -322,7 +324,7 @@ use_nfs41_getattr:
  429.      if (args->query & OWNER_SECURITY_INFORMATION) {
  430.          // parse user@domain. currently ignoring domain part XX
  431.          convert_nfs4name_2_user_domain(info.owner, &domain);
  432. -        DPRINTF(ACLLVL, ("handle_getacl: OWNER_SECURITY_INFORMATION: for user='%s' "
  433. +        DPRINTF(ACLLVL2, ("handle_getacl: OWNER_SECURITY_INFORMATION: for user='%s' "
  434.                  "domain='%s'\n", info.owner, domain?domain:"<null>"));
  435.          sid_len = 0;
  436.          status = map_nfs4servername_2_sid(nfs41dg,
  437. @@ -340,7 +342,7 @@ use_nfs41_getattr:
  438.  
  439.      if (args->query & GROUP_SECURITY_INFORMATION) {
  440.          convert_nfs4name_2_user_domain(info.owner_group, &domain);
  441. -        DPRINTF(ACLLVL, ("handle_getacl: GROUP_SECURITY_INFORMATION: for '%s' "
  442. +        DPRINTF(ACLLVL2, ("handle_getacl: GROUP_SECURITY_INFORMATION: for '%s' "
  443.                  "domain='%s'\n", info.owner_group, domain?domain:"<null>"));
  444.          sid_len = 0;
  445.          status = map_nfs4servername_2_sid(nfs41dg,
  446. @@ -356,7 +358,7 @@ use_nfs41_getattr:
  447.          }
  448.      }
  449.      if (args->query & DACL_SECURITY_INFORMATION) {
  450. -        DPRINTF(ACLLVL, ("handle_getacl: DACL_SECURITY_INFORMATION\n"));
  451. +        DPRINTF(ACLLVL2, ("handle_getacl: DACL_SECURITY_INFORMATION\n"));
  452.          status = convert_nfs4acl_2_dacl(nfs41dg,
  453.              info.acl, state->type, &dacl, &sids);
  454.          if (status)
  455. @@ -408,7 +410,9 @@ out:
  456.          nfsacl41_free(info.acl);
  457.      }
  458.  
  459. -    DPRINTF(ACLLVL, ("<-- handle_getacl() returning %d\n", status));
  460. +    DPRINTF(ACLLVL1, ("<-- handle_getacl(state->path.path='%s') "
  461. +        "returning %d\n",
  462. +        state->path.path, status));
  463.  
  464.      return status;
  465.  }
  466. @@ -461,7 +465,7 @@ static int is_well_known_sid(PSID sid, char *who, SID_NAME_USE *snu_out)
  467.          status = IsWellKnownSid(sid, (WELL_KNOWN_SID_TYPE)i);
  468.          if (!status) continue;
  469.          else {
  470. -            DPRINTF(ACLLVL, ("WELL_KNOWN_SID_TYPE %d\n", i));
  471. +            DPRINTF(ACLLVL3, ("WELL_KNOWN_SID_TYPE %d\n", i));
  472.              switch((WELL_KNOWN_SID_TYPE)i) {
  473.              case WinCreatorOwnerSid:
  474.                  memcpy(who, ACE4_OWNER, strlen(ACE4_OWNER)+1);
  475. @@ -522,7 +526,7 @@ static void map_winace2nfs4aceflags(BYTE win_aceflags, uint32_t *nfs4_aceflags)
  476.          *nfs4_aceflags |= ACE4_INHERIT_ONLY_ACE;
  477.      if (win_aceflags & INHERITED_ACE)
  478.          *nfs4_aceflags |= ACE4_INHERITED_ACE;
  479. -    DPRINTF(ACLLVL,
  480. +    DPRINTF(ACLLVL3,
  481.          ("map_winace2nfs4aceflags: win_aceflags=0x%x nfs4_aceflags=0x%x\n",
  482.          (int)win_aceflags, (int)*nfs4_aceflags));
  483.  }
  484. @@ -539,7 +543,7 @@ static void map_nfs4aceflags2winaceflags(uint32_t nfs4_aceflags, DWORD *win_acef
  485.          *win_aceflags |= INHERIT_ONLY_ACE;
  486.      if (nfs4_aceflags & ACE4_INHERITED_ACE)
  487.          *win_aceflags |= INHERITED_ACE;
  488. -    DPRINTF(ACLLVL,
  489. +    DPRINTF(ACLLVL3,
  490.          ("map_nfs4aceflags2winace: nfs4_aceflags=0x%x win_aceflags=0x%x\n",
  491.          (int)nfs4_aceflags, (int)*win_aceflags));
  492.  }
  493. @@ -771,9 +775,9 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  494.      DWORD who_size = sizeof(who_buf), domain_size = sizeof(domain_buf);
  495.      LPSTR sidstr = NULL;
  496.  
  497. -    DPRINTF(ACLLVL, ("--> map_nfs4ace_who(sid=0x%p,owner_sid=0x%p, group_sid=0x%p)\n"));
  498. +    DPRINTF(ACLLVL2, ("--> map_nfs4ace_who(sid=0x%p,owner_sid=0x%p, group_sid=0x%p)\n"));
  499.  
  500. -    if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  501. +    if (DPRINTF_LEVEL_ENABLED(ACLLVL2)) {
  502.          print_sid("sid", sid);
  503.          print_sid("owner_sid", owner_sid);
  504.          print_sid("group_sid", group_sid);
  505. @@ -786,7 +790,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  506.      status = 0;
  507.      if (owner_sid) {
  508.          if (EqualSid(sid, owner_sid)) {
  509. -            DPRINTF(ACLLVL, ("map_nfs4ace_who: this is owner's sid\n"));
  510. +            DPRINTF(ACLLVL2, ("map_nfs4ace_who: this is owner's sid\n"));
  511.              memcpy(who_out, ACE4_OWNER, strlen(ACE4_OWNER)+1);
  512.              sid_type = SidTypeUser;
  513.              status = ERROR_SUCCESS;
  514. @@ -795,7 +799,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  515.      }
  516.      if (group_sid) {
  517.          if (EqualSid(sid, group_sid)) {
  518. -            DPRINTF(ACLLVL, ("map_nfs4ace_who: this is group's sid\n"));
  519. +            DPRINTF(ACLLVL2, ("map_nfs4ace_who: this is group's sid\n"));
  520.              memcpy(who_out, ACE4_GROUP, strlen(ACE4_GROUP)+1);
  521.              sid_type = SidTypeGroup;
  522.              status = ERROR_SUCCESS;
  523. @@ -826,7 +830,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  524.      lasterr = GetLastError();
  525.  
  526.      if (status) {
  527. -        DPRINTF(ACLLVL, ("map_nfs4ace_who: "
  528. +        DPRINTF(ACLLVL2, ("map_nfs4ace_who: "
  529.              "LookupAccountSid(sidtostr(sid)='%s', who_buf='%s', "
  530.              "who_size=%d, domain='%s', domain_size=%d) "
  531.              "returned success, status=%d, GetLastError=%d\n",
  532. @@ -834,7 +838,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  533.              domain_buf, domain_size, status, lasterr));
  534.      }
  535.      else {
  536. -        DPRINTF(ACLLVL, ("map_nfs4ace_who: "
  537. +        DPRINTF(ACLLVL2, ("map_nfs4ace_who: "
  538.              "LookupAccountSid(sidtostr(sid)='%s', who_size=%d, "
  539.              "domain_size=%d) returned failure, status=%d, "
  540.              "GetLastError=%d\n",
  541. @@ -850,7 +854,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
  542.               * SIDs
  543.               */
  544.              case ERROR_NONE_MAPPED:
  545. -                DPRINTF(ACLLVL, ("map_nfs4ace_who: LookupAccountSidA() "
  546. +                DPRINTF(ACLLVL2, ("map_nfs4ace_who: LookupAccountSidA() "
  547.                      "returned ERROR_NONE_MAPPED for sidstr='%s'\n",
  548.                      sidstr));
  549.                  status = lasterr;
  550. @@ -881,11 +885,11 @@ add_domain:
  551.      status = ERROR_SUCCESS;
  552.  out:
  553.      if (status) {
  554. -        DPRINTF(ACLLVL,
  555. +        DPRINTF(ACLLVL2,
  556.              ("<-- map_nfs4ace_who() returns %d\n", status));
  557.      }
  558.      else {
  559. -        DPRINTF(ACLLVL,
  560. +        DPRINTF(ACLLVL2,
  561.              ("<-- map_nfs4ace_who(who_out='%s', sid_type=%d) "
  562.              "returns %d\n",
  563.              who_out, sid_type, status));
  564. @@ -903,7 +907,7 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  565.  {
  566.      int status;
  567.      if (acl == NULL) {
  568. -        DPRINTF(ACLLVL, ("this is a NULL dacl: all access to an object\n"));
  569. +        DPRINTF(ACLLVL2, ("this is a NULL dacl: all access to an object\n"));
  570.          nfs4_acl->count = 1;
  571.          nfs4_acl->aces = calloc(1, sizeof(nfsace4));
  572.          if (nfs4_acl->aces == NULL) {
  573. @@ -925,8 +929,8 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  574.          SID_NAME_USE who_sid_type = 0;
  575.          ACCESS_MASK win_mask;
  576.  
  577. -        DPRINTF(ACLLVL, ("NON-NULL dacl with %d ACEs\n", acl->AceCount));
  578. -        if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  579. +        DPRINTF(ACLLVL2, ("NON-NULL dacl with %d ACEs\n", acl->AceCount));
  580. +        if (DPRINTF_LEVEL_ENABLED(ACLLVL3)) {
  581.              print_hexbuf_no_asci("ACL\n",
  582.                  (const unsigned char *)acl, acl->AclSize);
  583.          }
  584. @@ -945,11 +949,11 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  585.                  goto out_free;
  586.              }
  587.              tmp_pointer = (PBYTE)ace;
  588. -            if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  589. +            if (DPRINTF_LEVEL_ENABLED(ACLLVL3)) {
  590.                  print_hexbuf_no_asci("ACE\n",
  591.                      (const unsigned char *)ace, ace->AceSize);
  592.              }
  593. -            DPRINTF(ACLLVL, ("ACE TYPE: %x\n", ace->AceType));
  594. +            DPRINTF(ACLLVL3, ("ACE TYPE: %x\n", ace->AceType));
  595.              if (ace->AceType == ACCESS_ALLOWED_ACE_TYPE)
  596.                  nfs4_acl->aces[i].acetype = ACE4_ACCESS_ALLOWED_ACE_TYPE;
  597.              else if (ace->AceType == ACCESS_DENIED_ACE_TYPE)
  598. @@ -987,7 +991,7 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  599.               */
  600.              if ((who_sid_type == SidTypeGroup) ||
  601.                  (who_sid_type == SidTypeAlias)) {
  602. -                DPRINTF(ACLLVL, ("map_dacl_2_nfs4acl: who_sid_type='%s': "
  603. +                DPRINTF(ACLLVL3, ("map_dacl_2_nfs4acl: who_sid_type='%s': "
  604.                      "aces[%d].who='%s': "
  605.                      "setting group flag\n",
  606.                      map_SID_NAME_USE2str(who_sid_type),
  607. @@ -995,7 +999,7 @@ static int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl,
  608.                  nfs4_acl->aces[i].aceflag |= ACE4_IDENTIFIER_GROUP;
  609.              }
  610.  
  611. -            if (DPRINTF_LEVEL_ENABLED(0)) {
  612. +            if (DPRINTF_LEVEL_ENABLED(ACLLVL1)) {
  613.                  dprintf_out("win2nfs: nfs4_acl->aces[%d]=(who='%s', "
  614.                      "acetype='%s', "
  615.                      "aceflag='%s'/0x%lx, "
  616. @@ -1041,11 +1045,11 @@ static int handle_setacl(void *daemon_context, nfs41_upcall *upcall)
  617.      char ownerbuf[NFS4_OPAQUE_LIMIT+1];
  618.      char groupbuf[NFS4_OPAQUE_LIMIT+1];
  619.  
  620. -    DPRINTF(ACLLVL, ("--> handle_setacl(state->path.path='%s')\n",
  621. +    DPRINTF(ACLLVL1, ("--> handle_setacl(state->path.path='%s')\n",
  622.          state->path.path));
  623.  
  624.      if (args->query & OWNER_SECURITY_INFORMATION) {
  625. -        DPRINTF(ACLLVL, ("handle_setacl: OWNER_SECURITY_INFORMATION\n"));
  626. +        DPRINTF(ACLLVL2, ("handle_setacl: OWNER_SECURITY_INFORMATION\n"));
  627.          status = GetSecurityDescriptorOwner(args->sec_desc, &sid, &sid_default);
  628.          if (!status) {
  629.              status = GetLastError();
  630. @@ -1067,7 +1071,7 @@ static int handle_setacl(void *daemon_context, nfs41_upcall *upcall)
  631.      }
  632.  
  633.      if (args->query & GROUP_SECURITY_INFORMATION) {
  634. -        DPRINTF(ACLLVL, ("handle_setacl: GROUP_SECURITY_INFORMATION\n"));
  635. +        DPRINTF(ACLLVL2, ("handle_setacl: GROUP_SECURITY_INFORMATION\n"));
  636.          status = GetSecurityDescriptorGroup(args->sec_desc, &sid, &sid_default);
  637.          if (!status) {
  638.              status = GetLastError();
  639. @@ -1091,7 +1095,7 @@ static int handle_setacl(void *daemon_context, nfs41_upcall *upcall)
  640.      if (args->query & DACL_SECURITY_INFORMATION) {
  641.          BOOL dacl_present, dacl_default;
  642.          PACL acl;
  643. -        DPRINTF(ACLLVL, ("handle_setacl: DACL_SECURITY_INFORMATION\n"));
  644. +        DPRINTF(ACLLVL2, ("handle_setacl: DACL_SECURITY_INFORMATION\n"));
  645.          status = GetSecurityDescriptorDacl(args->sec_desc, &dacl_present,
  646.                                              &acl, &dacl_default);
  647.          if (!status) {
  648. @@ -1127,17 +1131,17 @@ static int handle_setacl(void *daemon_context, nfs41_upcall *upcall)
  649.          OPEN_DELEGATE_WRITE, FALSE);
  650.  
  651.      nfs41_open_stateid_arg(state, &stateid);
  652. -    if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  653. +    if (DPRINTF_LEVEL_ENABLED(ACLLVL2)) {
  654.          print_nfs41_file_info("handle_setacl: nfs41_setattr() info IN:", &info);
  655.      }
  656.      status = nfs41_setattr(state->session, &state->file, &stateid, &info);
  657.      if (status) {
  658. -        DPRINTF(ACLLVL, ("handle_setacl: nfs41_setattr() failed with error '%s'.\n",
  659. +        DPRINTF(ACLLVL1, ("handle_setacl: nfs41_setattr() failed with error '%s'.\n",
  660.                  nfs_error_string(status)));
  661.          status = nfs_to_windows_error(status, ERROR_NOT_SUPPORTED);
  662.      }
  663.      else {
  664. -        if (DPRINTF_LEVEL_ENABLED(ACLLVL)) {
  665. +        if (DPRINTF_LEVEL_ENABLED(ACLLVL1)) {
  666.              print_nfs41_file_info("handle_setacl: nfs41_setattr() success info OUT:", &info);
  667.          }
  668.      }
  669. @@ -1145,7 +1149,7 @@ static int handle_setacl(void *daemon_context, nfs41_upcall *upcall)
  670.      if (args->query & DACL_SECURITY_INFORMATION)
  671.          free(nfs4_acl.aces);
  672.  out:
  673. -    DPRINTF(ACLLVL, ("<-- handle_setacl() returning %d\n", status));
  674. +    DPRINTF(ACLLVL1, ("<-- handle_setacl() returning %d\n", status));
  675.      return status;
  676.  }
  677.  
  678. --
  679. 2.45.1
  680.  
  681. From 05e98895f9697c139dc36729303742e3d086a704 Mon Sep 17 00:00:00 2001
  682. From: Roland Mainz <roland.mainz@nrubsig.org>
  683. Date: Sat, 22 Jun 2024 15:08:33 +0200
  684. Subject: [PATCH 5/5] tests: Add nfsbuildtest.ksh93 (gcc) build torture test
  685.  
  686. Add nfsbuildtest.ksh93 (gcc) build torture test
  687.  
  688. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  689. ---
  690. tests/nfsbuildtest/nfsbuildtest.ksh93 | 131 ++++++++++++++++++++++++++
  691.  1 file changed, 131 insertions(+)
  692.  create mode 100644 tests/nfsbuildtest/nfsbuildtest.ksh93
  693.  
  694. diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
  695. new file mode 100644
  696. index 0000000..fe7d492
  697. --- /dev/null
  698. +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
  699. @@ -0,0 +1,131 @@
  700. +#!/usr/bin/ksh93
  701. +
  702. +#
  703. +# nfsbuildtest.ksh93
  704. +#
  705. +# Simple NFSv4 torture test by building gcc in parallel
  706. +# on a NFS filesystem
  707. +#
  708. +set -o xtrace
  709. +set -o errexit
  710. +set -o nounset
  711. +
  712. +#
  713. +# build config
  714. +#
  715. +typeset config_cp_p_function_not_implemented_workaround=false
  716. +typeset config_use_posix_ksh93_builtins=true
  717. +
  718. +compound gitdata=(
  719. +       typeset url='git://repo.or.cz/gcc.git'
  720. +        # use fixed git tag, so build times are compareable
  721. +       typeset tag='releases/gcc-13.1.0'
  722. +)
  723. +
  724. +typeset -a configure_options=(
  725. +       # Per irc://irc.oftc.net/#gcc:
  726. +       # ".. pch is broken on windows as allocation using the fixed
  727. +       # address might not succeed in general and there is fixed
  728. +       # retry loop using delay that kills all performance
  729. +       # benefits..."
  730. +       '--disable-libstdcxx-pch'
  731. +)
  732. +
  733. +#
  734. +# temp dir setup
  735. +#
  736. +
  737. +# fixme: Does not work with NFSv4.1 filesystem from exported Linux tmpfs - why ?
  738. +#tmpdir='/cygdrive/m/tmpdir'
  739. +#mkdir -p "$tmpdir"
  740. +#chmod a=rwxt "$tmpdir"
  741. +#if [[ -d "$tmpdir" && -w "$tmpdir" ]] ; then
  742. +#      export TMPDIR="$tmpdir"
  743. +#fi
  744. +
  745. +#
  746. +# print user info
  747. +#
  748. +id -a
  749. +pwd
  750. +
  751. +#
  752. +# source checkout
  753. +#
  754. +
  755. +#time git -c checkout.workers=16 clone -b "${gitdata.tag}" --single-branch git://gcc.gnu.org/git/gcc.git
  756. +#time git -c checkout.workers=16 clone -b "${gitdata.tag}" --single-branch https://github.com/gcc-mirror/gcc.git
  757. +
  758. +if [[ -f '../gitbundles/gcc.bundle' ]] ; then
  759. +       # Use local bundle as cache,
  760. +        # so build times only depend on local filesystem performance
  761. +        # and not HTTPS speed
  762. +        #
  763. +       # The bundle was created like this:
  764. +       # ---- snip ----
  765. +       # git clone git://repo.or.cz/gcc.git
  766. +       # cd gcc
  767. +       # git bundle create '../gitbundles/gcc.bundle' --all
  768. +       # cd ..
  769. +       # rm -Rf gcc
  770. +       # ---- snip ----
  771. +       time git -c checkout.workers=16 clone -b "${gitdata.tag}" --single-branch '../gitbundles/gcc.bundle'
  772. +else
  773. +       time git -c checkout.workers=16 clone -b "${gitdata.tag}" --single-branch "${gitdata.url}"
  774. +fi
  775. +
  776. +cd "$PWD/gcc/"
  777. +
  778. +if $config_use_posix_ksh93_builtins ; then
  779. +       PATH="/usr/ast/bin:/opt/ast/bin:$PATH"
  780. +fi
  781. +
  782. +#
  783. +# patch sources and configure build
  784. +#
  785. +
  786. +# Cygwin: workaround for configure using cp -p where ln -s should be used
  787. +# (this is an automake/autoconf issue, they should trust Cygwin and not use
  788. +# ancient workarounds for issues which no longer exists)
  789. +(set -o xtrace ; sed -i "s/as_ln_s='cp -pR'/as_ln_s='ln -s'/g" $(find . -name 'configure') )
  790. +
  791. +if $config_use_posix_ksh93_builtins ; then
  792. +       (set -o xtrace ; sed -i "s/\/bin\/sh/\/bin\/ksh93/g" $(find . -name 'configure') )
  793. +fi
  794. +
  795. +if $config_use_posix_ksh93_builtins ; then
  796. +       ksh93 ./configure "${configure_options[@]}"
  797. +else
  798. +       bash ./configure "${configure_options[@]}"
  799. +fi
  800. +
  801. +if $config_cp_p_function_not_implemented_workaround ; then
  802. +       # workaround for $ cp -p # failing with "Function not
  803. +       # implemented" in older versions of ms-nfs41-client
  804. +       if $config_use_posix_ksh93_builtins ; then
  805. +               (
  806. +                       set -o xtrace
  807. +                       sed -i -r 's/(cp.*)([[:space:]]+-p[[:space:]]+)/\2 -A pt /g' \
  808. +                               $(find . -name 'Makefile' -o -name 'Makefile.in')
  809. +               )
  810. +       else
  811. +               (
  812. +                       set -o xtrace ; sed -i -r 's/(cp.*)([[:space:]]+-p[[:space:]]+)/\2--no-preserve=ownership /g' \
  813. +                               $(find . -name 'Makefile' -o -name 'Makefile.in')
  814. +               )
  815. +       fi
  816. +fi
  817. +
  818. +if $config_use_posix_ksh93_builtins ; then
  819. +       # replace /bin/sh with /bin/ksh93 for speed
  820. +       (set -o xtrace ; sed -i -r 's/\/bin\/sh/\/bin\/ksh93/g' \
  821. +               $(find . -name 'Makefile' -o -name 'Makefile.in') )
  822. +fi
  823. +
  824. +#
  825. +# build gcc
  826. +#
  827. +time ksh93 -c 'export SHELL=/bin/ksh93 ; (yes | make -j8 all)'
  828. +echo $?
  829. +
  830. +echo "#Done."
  831. --
  832. 2.45.1

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at