瀏覽代碼

dpkg-statoverride: Refer to path instead of file

This clarifies the term removing the need to mention what file actually
refers to. And gets rid of a first person usage.
Guillem Jover 13 年之前
父節點
當前提交
b76dbb70b0
共有 3 個文件被更改,包括 16 次插入15 次删除
  1. 1 0
      debian/changelog
  2. 10 10
      man/dpkg-statoverride.8
  3. 5 5
      src/statcmd.c

+ 1 - 0
debian/changelog

@@ -50,6 +50,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Mask fortify hardening option from dpkg-buildflags output on noopt.
   * Mask fortify hardening option from dpkg-buildflags output on noopt.
     New glibc 2.16 and later, issue a warning on this condition.
     New glibc 2.16 and later, issue a warning on this condition.
     Closes: #691745
     Closes: #691745
+  * Refer to path instead of file on dpkg-statoverride.
 
 
  -- Guillem Jover <guillem@debian.org>  Fri, 03 Aug 2012 13:21:00 +0200
  -- Guillem Jover <guillem@debian.org>  Fri, 03 Aug 2012 13:21:00 +0200
 
 

+ 10 - 10
man/dpkg-statoverride.8

@@ -1,7 +1,7 @@
 .\" dpkg manual page - dpkg-statoverride(8)
 .\" dpkg manual page - dpkg-statoverride(8)
 .\"
 .\"
 .\" Copyright © 2000-2001 Wichert Akkerman <wakkerma@debian.org>
 .\" Copyright © 2000-2001 Wichert Akkerman <wakkerma@debian.org>
-.\" Copyright © 2009-2011 Guillem Jover <guillem@debian.org>
+.\" Copyright © 2009-2011, 2013 Guillem Jover <guillem@debian.org>
 .\"
 .\"
 .\" This is free software; you can redistribute it and/or modify
 .\" This is free software; you can redistribute it and/or modify
 .\" it under the terms of the GNU General Public License as published by
 .\" it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .
 .
-.TH dpkg\-statoverride 8 "2011-07-04" "Debian project" "dpkg utilities"
+.TH dpkg\-statoverride 8 "2013-04-01" "Debian project" "dpkg utilities"
 .SH NAME
 .SH NAME
 dpkg\-statoverride \- override ownership and mode of files
 dpkg\-statoverride \- override ownership and mode of files
 .
 .
@@ -28,8 +28,8 @@ dpkg\-statoverride \- override ownership and mode of files
 `\fBstat overrides\fR' are a way to tell
 `\fBstat overrides\fR' are a way to tell
 .BR dpkg (1)
 .BR dpkg (1)
 to use a different owner
 to use a different owner
-or mode for a file when a package is installed. (note: I use the word
-`file' here, but in reality this can be any filesystem object that
+or mode for a path when a package is installed (this applies to any
+filesystem object that
 .B dpkg
 .B dpkg
 handles, including directories, devices, etc.). This can be used to
 handles, including directories, devices, etc.). This can be used to
 force programs that are normally setuid to be install without a setuid
 force programs that are normally setuid to be install without a setuid
@@ -41,19 +41,19 @@ overrides.
 .
 .
 .SH COMMANDS
 .SH COMMANDS
 .TP
 .TP
-.BI \-\-add " user group mode file"
-Add an override for \fIfile\fP. \fIfile\fP does not need to exist
+.BI \-\-add " user group mode path"
+Add an override for \fIpath\fP. \fIpath\fP does not need to exist
 when this command is used; the override will be stored and used later.
 when this command is used; the override will be stored and used later.
 Users and groups can be specified by their name (for example \fBroot\fR
 Users and groups can be specified by their name (for example \fBroot\fR
 or \fBnobody\fR), or by their number by prepending the number with a
 or \fBnobody\fR), or by their number by prepending the number with a
 `\fB#\fR' (for example \fB#0\fR or \fB#65534\fR). The \fImode\fR needs
 `\fB#\fR' (for example \fB#0\fR or \fB#65534\fR). The \fImode\fR needs
 to be specified in octal.
 to be specified in octal.
 
 
-If \fB\-\-update\fP is specified and \fIfile\fP exists, it is immediately
+If \fB\-\-update\fP is specified and \fIpath\fP exists, it is immediately
 set to the new owner and mode.
 set to the new owner and mode.
 .TP
 .TP
-.BI \-\-remove " file"
-Remove an override for \fIfile\fP, the status of \fIfile\fP is left
+.BI \-\-remove " path"
+Remove an override for \fIpath\fP, the status of \fIpath\fP is left
 unchanged by this command.
 unchanged by this command.
 .TP
 .TP
 .BR \-\-list " [\fIglob-pattern\fP]"
 .BR \-\-list " [\fIglob-pattern\fP]"
@@ -78,7 +78,7 @@ Force an action, even if a sanity check would otherwise prohibit it.
 This is necessary to override an existing override.
 This is necessary to override an existing override.
 .TP
 .TP
 .B \-\-update
 .B \-\-update
-Immediately try to change the file to the new owner and mode if it
+Immediately try to change the \fIpath\fP to the new owner and mode if it
 exists.
 exists.
 .TP
 .TP
 .B \-\-quiet
 .B \-\-quiet

+ 5 - 5
src/statcmd.c

@@ -75,16 +75,16 @@ usage(const struct cmdinfo *cip, const char *value)
 
 
 	printf(_(
 	printf(_(
 "Commands:\n"
 "Commands:\n"
-"  --add <owner> <group> <mode> <file>\n"
-"                           add a new entry into the database.\n"
-"  --remove <file>          remove file from the database.\n"
+"  --add <owner> <group> <mode> <path>\n"
+"                           add a new <path> entry into the database.\n"
+"  --remove <path>          remove <path> from the database.\n"
 "  --list [<glob-pattern>]  list current overrides in the database.\n"
 "  --list [<glob-pattern>]  list current overrides in the database.\n"
 "\n"));
 "\n"));
 
 
 	printf(_(
 	printf(_(
 "Options:\n"
 "Options:\n"
 "  --admindir <directory>   set the directory with the statoverride file.\n"
 "  --admindir <directory>   set the directory with the statoverride file.\n"
-"  --update                 immediately update file permissions.\n"
+"  --update                 immediately update <path> permissions.\n"
 "  --force                  force an action even if a sanity check fails.\n"
 "  --force                  force an action even if a sanity check fails.\n"
 "  --quiet                  quiet operation, minimal output.\n"
 "  --quiet                  quiet operation, minimal output.\n"
 "  --help                   show this help message.\n"
 "  --help                   show this help message.\n"
@@ -227,7 +227,7 @@ statoverride_add(const char *const *argv)
 		badusage(_("--%s needs four arguments"), cipaction->olong);
 		badusage(_("--%s needs four arguments"), cipaction->olong);
 
 
 	if (strchr(path, '\n'))
 	if (strchr(path, '\n'))
-		badusage(_("file may not contain newlines"));
+		badusage(_("path may not contain newlines"));
 
 
 	filename = path_cleanup(path);
 	filename = path_cleanup(path);