_secure_path.c (84225) | _secure_path.c (91211) |
---|---|
1/*- 2 * Based on code copyright (c) 1995,1997 by 3 * Berkeley Software Design, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, is permitted provided that the following conditions 8 * are met: --- 6 unchanged lines hidden (view full) --- 15 * 3. This work was done expressly for inclusion into FreeBSD. Other use 16 * is permitted provided this notation is included. 17 * 4. Absolutely no warranty of function or purpose is made by the authors. 18 * 5. Modifications may be freely made to this file providing the above 19 * conditions are met. 20 */ 21 22#include <sys/cdefs.h> | 1/*- 2 * Based on code copyright (c) 1995,1997 by 3 * Berkeley Software Design, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, is permitted provided that the following conditions 8 * are met: --- 6 unchanged lines hidden (view full) --- 15 * 3. This work was done expressly for inclusion into FreeBSD. Other use 16 * is permitted provided this notation is included. 17 * 4. Absolutely no warranty of function or purpose is made by the authors. 18 * 5. Modifications may be freely made to this file providing the above 19 * conditions are met. 20 */ 21 22#include <sys/cdefs.h> |
23__FBSDID("$FreeBSD: head/lib/libutil/_secure_path.c 84225 2001-09-30 22:35:07Z dillon $"); | 23__FBSDID("$FreeBSD: head/lib/libutil/_secure_path.c 91211 2002-02-25 01:25:30Z bde $"); |
24 25#include <sys/types.h> 26#include <sys/stat.h> | 24 25#include <sys/types.h> 26#include <sys/stat.h> |
27#include <syslog.h> | 27 |
28#include <errno.h> 29#include <libutil.h> | 28#include <errno.h> 29#include <libutil.h> |
30#include <stddef.h> 31#include <syslog.h> |
|
30 31/* 32 * Check for common security problems on a given path 33 * It must be: 34 * 1. A regular file, and exists 35 * 2. Owned and writaable only by root (or given owner) 36 * 3. Group ownership is given group or is non-group writable 37 * --- 35 unchanged lines hidden --- | 32 33/* 34 * Check for common security problems on a given path 35 * It must be: 36 * 1. A regular file, and exists 37 * 2. Owned and writaable only by root (or given owner) 38 * 3. Group ownership is given group or is non-group writable 39 * --- 35 unchanged lines hidden --- |