Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/xcvs/dist/src - add more debugging
details: https://anonhg.NetBSD.org/src/rev/da756278ecba
branches: trunk
changeset: 781854:da756278ecba
user: christos <christos%NetBSD.org@localhost>
date: Wed Oct 03 22:28:20 2012 +0000
description:
- add more debugging
- don't return memory we did not allocate, which the caller will then free!
diffstat:
external/gpl2/xcvs/dist/src/acl.c | 43 +++++++++++++++++++++++++++++++++-----
1 files changed, 37 insertions(+), 6 deletions(-)
diffs (102 lines):
diff -r 8c0bed9b7c5e -r da756278ecba external/gpl2/xcvs/dist/src/acl.c
--- a/external/gpl2/xcvs/dist/src/acl.c Wed Oct 03 21:50:14 2012 +0000
+++ b/external/gpl2/xcvs/dist/src/acl.c Wed Oct 03 22:28:20 2012 +0000
@@ -279,16 +279,26 @@
if (debug) fprintf(stderr, "perm %d\n", perm);
if (valid_perm (part_perms, perm))
{
+ if (debug) fprintf(stderr, "signlevel=%d "
+ " x=%d, aclconfig_default_used=%d\n",
+ signlevel, x, aclconfig_default_used);
if (signlevel == x)
{
if (strcmp(part_tag, "ALL") != 0 &&
- !aclconfig_default_used)
+ !aclconfig_default_used) {
retval = 1;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
+ }
}
else if (!aclconfig_default_used)
{
signlevel = x;
retval = 1;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
}
else {
/* nothing... */
@@ -299,13 +309,20 @@
if (signlevel == x)
{
if (strcmp(part_tag, "ALL") != 0 &&
- !aclconfig_default_used)
+ !aclconfig_default_used) {
retval = 0;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
+ }
}
else if (!aclconfig_default_used)
{
signlevel = x;
retval = 0;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
if (strncmp (part_type, "f", 1) == 0)
founddeniedfile = 1;
@@ -334,11 +351,18 @@
if (valid_perm (part_perms, perm))
{
retval = 1;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
if (perm == 8)
dadmin = 1;
}
- else
+ else {
retval = 0;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
+ }
}
}
@@ -353,10 +377,17 @@
{
if (debug) fprintf(stderr, "not found line\n");
/* DEFAULT */
- if (valid_perm (NULL, perm))
+ if (valid_perm (NULL, perm)) {
retval = 1;
- else
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
+ } else {
retval = 0;
+ if (debug) fprintf(stderr,
+ "%s, %d: %d\n", __FILE__, __LINE__,
+ retval);
+ }
}
/* acl admin rigths 'p' */
@@ -491,7 +522,7 @@
aclconfig_default_used = 1;
if (debug) fprintf (stderr, "default %s\n",
cvs_acl_default_permissions);
- return (cvs_acl_default_permissions);
+ return xstrdup(cvs_acl_default_permissions);
}
else {
if (debug) fprintf (stderr, "early %s\n", xperms);
Home |
Main Index |
Thread Index |
Old Index