Marcus Meissner
5439477a49
- Update to git snapshot dated 21 Sep 2015. - Added: * 0001-Install-the-libraries-to-the-appropriate-directory.patch * 0002-setfacl.1-fix-typo-inclu-de-include.patch * 0003-test-fix-insufficient-quoting-of.patch * 0004-Makefile-rename-configure.in-to-configure.ac.patch * 0005-Bad-markup-in-acl.5-page.patch * 0006-.gitignore-ignore-and-config.h.in.patch * 0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch * 0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch * 0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch * 0010-punt-debian-rpm-packaging-logic.patch * 0011-move-gettext-logic-into-misc.h.patch * 0012-test-make-running-parallel-out-of-tree-safe.patch * 0013-modernize-build-system.patch * 0014-po-regenerate-files-after-move.patch * 0015-build-drop-aclincludedir-use-pkgincludedir.patch * 0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch * 0017-build-ship-a-pkgconfig-file-for-libacl.patch * 0018-read_acl_-comments-seq-rename-line-to-lineno.patch * 0019-read_acl_-comments-seq-switch-to-next_line.patch * 0020-telldir-return-value-and-seekdir-second-parameters-a.patch * 0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch * 0022-add-__acl_-prefixes-to-internal-symbols.patch * 0023-cp.test-Check-permissions-of-the-right-file.patch * 0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch * 0025-fix-compilation-with-latest-xattr-git.patch * 0026-getfacl-Fix-memory-leak.patch * 0027-Fix-the-display-block-nesting-in-acl.5.patch * 0028-setfacl-man-page-Minor-wording-improvements.patch OBS-URL: https://build.opensuse.org/request/show/347209 OBS-URL: https://build.opensuse.org/package/show/Base:System/acl?expand=0&rev=43
129 lines
2.8 KiB
Diff
129 lines
2.8 KiB
Diff
From 3d615724df45f9d7b3438ce7aa2d4f1704aad7d1 Mon Sep 17 00:00:00 2001
|
|
From: Mike Frysinger <vapier@gentoo.org>
|
|
Date: Sun, 19 Jan 2014 00:35:13 -0500
|
|
Subject: [PATCH 18/34] read_acl_{comments,seq}: rename "line" to "lineno"
|
|
|
|
The word "line" is used to refer to the content of a line, and a few
|
|
places are already using "lineno". Change all to "lineno" so that we
|
|
can use "line" consistently.
|
|
---
|
|
tools/parse.c | 14 +++++++-------
|
|
tools/parse.h | 4 ++--
|
|
tools/setfacl.c | 10 +++++-----
|
|
3 files changed, 14 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/tools/parse.c b/tools/parse.c
|
|
index e7e6add..6f30cf5 100644
|
|
--- a/tools/parse.c
|
|
+++ b/tools/parse.c
|
|
@@ -407,7 +407,7 @@ fail:
|
|
int
|
|
read_acl_comments(
|
|
FILE *file,
|
|
- int *line,
|
|
+ int *lineno,
|
|
char **path_p,
|
|
uid_t *uid_p,
|
|
gid_t *gid_p,
|
|
@@ -439,15 +439,15 @@ read_acl_comments(
|
|
break;
|
|
if (c==' ' || c=='\t' || c=='\r' || c=='\n') {
|
|
if (c=='\n')
|
|
- (*line)++;
|
|
+ (*lineno)++;
|
|
continue;
|
|
}
|
|
if (c != '#') {
|
|
ungetc(c, file);
|
|
break;
|
|
}
|
|
- if (line)
|
|
- (*line)++;
|
|
+ if (lineno)
|
|
+ (*lineno)++;
|
|
|
|
if (fgets(linebuf, sizeof(linebuf), file) == NULL)
|
|
break;
|
|
@@ -539,7 +539,7 @@ read_acl_seq(
|
|
seq_t seq,
|
|
int seq_cmd,
|
|
int parse_mode,
|
|
- int *line,
|
|
+ int *lineno,
|
|
int *which)
|
|
{
|
|
char linebuf[1024];
|
|
@@ -552,8 +552,8 @@ read_acl_seq(
|
|
for(;;) {
|
|
if (fgets(linebuf, sizeof(linebuf), file) == NULL)
|
|
break;
|
|
- if (line)
|
|
- (*line)++;
|
|
+ if (lineno)
|
|
+ (*lineno)++;
|
|
|
|
cp = linebuf;
|
|
SKIP_WS(cp);
|
|
diff --git a/tools/parse.h b/tools/parse.h
|
|
index b2e68b4..2549753 100644
|
|
--- a/tools/parse.h
|
|
+++ b/tools/parse.h
|
|
@@ -61,7 +61,7 @@ parse_acl_seq(
|
|
int
|
|
read_acl_comments(
|
|
FILE *file,
|
|
- int *line,
|
|
+ int *lineno,
|
|
char **path_p,
|
|
uid_t *uid_p,
|
|
gid_t *gid_p,
|
|
@@ -72,7 +72,7 @@ read_acl_seq(
|
|
seq_t seq,
|
|
int seq_cmd,
|
|
int parse_mode,
|
|
- int *line,
|
|
+ int *lineno,
|
|
int *which);
|
|
|
|
|
|
diff --git a/tools/setfacl.c b/tools/setfacl.c
|
|
index f6135b7..b0ddedf 100644
|
|
--- a/tools/setfacl.c
|
|
+++ b/tools/setfacl.c
|
|
@@ -125,15 +125,15 @@ restore(
|
|
gid_t gid;
|
|
mode_t mask, flags;
|
|
struct do_set_args args = { };
|
|
- int line = 0, backup_line;
|
|
+ int lineno = 0, backup_line;
|
|
int error, status = 0;
|
|
int chmod_required = 0;
|
|
|
|
memset(&st, 0, sizeof(st));
|
|
|
|
for(;;) {
|
|
- backup_line = line;
|
|
- error = read_acl_comments(file, &line, &path_p, &uid, &gid,
|
|
+ backup_line = lineno;
|
|
+ error = read_acl_comments(file, &lineno, &path_p, &uid, &gid,
|
|
&flags);
|
|
if (error < 0) {
|
|
error = -error;
|
|
@@ -168,11 +168,11 @@ restore(
|
|
SEQ_PARSE_WITH_PERM |
|
|
SEQ_PARSE_DEFAULT |
|
|
SEQ_PARSE_MULTI,
|
|
- &line, NULL);
|
|
+ &lineno, NULL);
|
|
if (error != 0) {
|
|
fprintf(stderr, _("%s: %s: %s in line %d\n"),
|
|
progname, xquote(filename, "\n\r"), strerror(errno),
|
|
- line);
|
|
+ lineno);
|
|
status = 1;
|
|
goto getout;
|
|
}
|
|
--
|
|
2.5.2
|
|
|