summaryrefslogtreecommitdiff
path: root/usr/src/cmd/rm
diff options
context:
space:
mode:
authoras145665 <none@none>2006-07-31 11:03:23 -0700
committeras145665 <none@none>2006-07-31 11:03:23 -0700
commit79033acb8a0c499540c5c46e165cff4ccc2ebf59 (patch)
treed9eec5268861d13065eca39828713fd9b48ae170 /usr/src/cmd/rm
parent6e628f2786bf7adece487b606a56068e35e3fcd2 (diff)
downloadillumos-joyent-79033acb8a0c499540c5c46e165cff4ccc2ebf59.tar.gz
4866326 rm should issue warning if "." or ".." is target even if -f is specified
Diffstat (limited to 'usr/src/cmd/rm')
-rw-r--r--usr/src/cmd/rm/rm.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/usr/src/cmd/rm/rm.c b/usr/src/cmd/rm/rm.c
index 60960337a3..bbdbadf588 100644
--- a/usr/src/cmd/rm/rm.c
+++ b/usr/src/cmd/rm/rm.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -24,7 +23,7 @@
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -212,11 +211,9 @@ rm(char *path, int first)
else
p = path;
if (strcmp(".", p) == 0 || strcmp("..", p) == 0) {
- if (!silent) {
- (void) fprintf(stderr,
- gettext("rm of %s is not allowed\n"), path);
- errcode++;
- }
+ (void) fprintf(stderr,
+ gettext("rm of %s is not allowed\n"), path);
+ errcode++;
return;
}
/*