Deleted Added
full compact
compress.c (58630) compress.c (60622)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
43#endif
44static const char rcsid[] =
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
43#endif
44static const char rcsid[] =
45 "$FreeBSD: head/usr.bin/compress/compress.c 58630 2000-03-26 15:10:37Z charnier $";
45 "$FreeBSD: head/usr.bin/compress/compress.c 60622 2000-05-16 04:58:34Z hoek $";
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/stat.h>
50
51#include <err.h>
52#include <errno.h>
53#include <stdio.h>

--- 316 unchanged lines hidden (view full) ---

370 * the mode; current BSD behavior is to remove all setuid bits on
371 * chown. If chown fails, lose setuid/setgid bits.
372 */
373 if (chown(name, fs->st_uid, fs->st_gid)) {
374 if (errno != EPERM)
375 cwarn("chown: %s", name);
376 fs->st_mode &= ~(S_ISUID|S_ISGID);
377 }
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/stat.h>
50
51#include <err.h>
52#include <errno.h>
53#include <stdio.h>

--- 316 unchanged lines hidden (view full) ---

370 * the mode; current BSD behavior is to remove all setuid bits on
371 * chown. If chown fails, lose setuid/setgid bits.
372 */
373 if (chown(name, fs->st_uid, fs->st_gid)) {
374 if (errno != EPERM)
375 cwarn("chown: %s", name);
376 fs->st_mode &= ~(S_ISUID|S_ISGID);
377 }
378 if (chmod(name, fs->st_mode))
378 if (chmod(name, fs->st_mode) && errno != EOPNOTSUPP)
379 cwarn("chmod: %s", name);
380
379 cwarn("chmod: %s", name);
380
381 if (chflags(name, fs->st_flags))
381 if (chflags(name, fs->st_flags) && errno != EOPNOTSUPP)
382 cwarn("chflags: %s", name);
383}
384
385int
386permission(fname)
387 char *fname;
388{
389 int ch, first;

--- 64 unchanged lines hidden ---
382 cwarn("chflags: %s", name);
383}
384
385int
386permission(fname)
387 char *fname;
388{
389 int ch, first;

--- 64 unchanged lines hidden ---