summaryrefslogtreecommitdiffstats
path: root/sys/sys/lockf.h
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2005-03-10 17:26:10 +0000
committertedu <tedu@openbsd.org>2005-03-10 17:26:10 +0000
commitda90d235d9a0994d7ea5dba99a7c0b53d9268201 (patch)
treeae3ce9b59cb6dcda03d98de35746389a343cd77e /sys/sys/lockf.h
parentAvoid crash on finalization. We have been using this diff (diff)
downloadwireguard-openbsd-da90d235d9a0994d7ea5dba99a7c0b53d9268201.tar.xz
wireguard-openbsd-da90d235d9a0994d7ea5dba99a7c0b53d9268201.zip
split out uidinfo from kern_proc.c private, use it to store lock count,
restrict lock count per uid to a global limit, add sysctl to adjust limit. this prevents a user from creating too many locks. problem noticed by devon o'dell. ok deraadt miod pedro
Diffstat (limited to 'sys/sys/lockf.h')
-rw-r--r--sys/sys/lockf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/lockf.h b/sys/sys/lockf.h
index 35e6da253fd..1b17d451522 100644
--- a/sys/sys/lockf.h
+++ b/sys/sys/lockf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lockf.h,v 1.6 2004/01/14 19:34:05 grange Exp $ */
+/* $OpenBSD: lockf.h,v 1.7 2005/03/10 17:26:10 tedu Exp $ */
/* $NetBSD: lockf.h,v 1.5 1994/06/29 06:44:33 cgd Exp $ */
/*
@@ -53,6 +53,7 @@ struct lockf {
struct lockf *lf_next; /* A pointer to the next lock on this inode */
struct locklist lf_blkhd; /* The list of blocked locks */
TAILQ_ENTRY(lockf) lf_block; /* A request waiting for a lock */
+ uid_t lf_uid; /* User ID responsible */
};
/* Maximum length of sleep chains to traverse to try and detect deadlock. */