View | Details | Raw Unified | Return to bug 126433
Collapse All | Expand All

(-)rm.c (-3 / +3 lines)
Lines 230-236 rm_tree(char **argv) Link Here
230
			}
230
			}
231
			else if (!uid &&
231
			else if (!uid &&
232
				 (p->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
232
				 (p->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
233
				 !(p->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE)) &&
233
				 !(p->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE|SF_NOUNLINK|UF_NOUNLINK)) &&
234
				 chflags(p->fts_accpath,
234
				 chflags(p->fts_accpath,
235
					 p->fts_statp->st_flags &= ~(UF_APPEND|UF_IMMUTABLE)) < 0)
235
					 p->fts_statp->st_flags &= ~(UF_APPEND|UF_IMMUTABLE)) < 0)
236
				goto err;
236
				goto err;
Lines 249-255 rm_tree(char **argv) Link Here
249
		rval = 0;
249
		rval = 0;
250
		if (!uid &&
250
		if (!uid &&
251
		    (p->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
251
		    (p->fts_statp->st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
252
		    !(p->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE)))
252
		    !(p->fts_statp->st_flags & (SF_APPEND|SF_IMMUTABLE|SF_NOUNLINK|UF_NOUNLINK)))
253
			rval = chflags(p->fts_accpath,
253
			rval = chflags(p->fts_accpath,
254
				       p->fts_statp->st_flags &= ~(UF_APPEND|UF_IMMUTABLE));
254
				       p->fts_statp->st_flags &= ~(UF_APPEND|UF_IMMUTABLE));
255
		if (rval == 0) {
255
		if (rval == 0) {
Lines 349-355 rm_file(char **argv) Link Here
349
		rval = 0;
349
		rval = 0;
350
		if (!uid && !S_ISWHT(sb.st_mode) &&
350
		if (!uid && !S_ISWHT(sb.st_mode) &&
351
		    (sb.st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
351
		    (sb.st_flags & (UF_APPEND|UF_IMMUTABLE)) &&
352
		    !(sb.st_flags & (SF_APPEND|SF_IMMUTABLE)))
352
		    !(sb.st_flags & (SF_APPEND|SF_IMMUTABLE|SF_NOUNLINK|UF_NOUNLINK)))
353
			rval = chflags(f, sb.st_flags & ~(UF_APPEND|UF_IMMUTABLE));
353
			rval = chflags(f, sb.st_flags & ~(UF_APPEND|UF_IMMUTABLE));
354
		if (rval == 0) {
354
		if (rval == 0) {
355
			if (S_ISWHT(sb.st_mode))
355
			if (S_ISWHT(sb.st_mode))

Return to bug 126433