From owner-freebsd-current Wed Mar 17 10:21:40 1999 Delivered-To: freebsd-current@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id A39B8153A6; Wed, 17 Mar 1999 10:21:35 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id DAA28431; Thu, 18 Mar 1999 03:21:04 +0900 (JST) Message-ID: <36EFEDEC.D11C7599@newsguy.com> Date: Thu, 18 Mar 1999 03:01:16 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: Jay Tribick Cc: Dmitry Valdov , freebsd-current@FreeBSD.ORG, freebsd-security@FreeBSD.ORG Subject: Re: disk quota overriding References: <19990317114932.Z21466@bofh.fastnet.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jay Tribick wrote: > > > There is a way to overflow / filesystem even is quota is enabled. > > > > Just make many hard links (for example /bin/sh) to /tmp/ > > > > for ($q=0;$q<100000;$q++){ > > system ("ln /bin/sh /tmp/ln$q"); > > } > > > > Because /tmp directory usually owned by root that why quotas has no effect. > > *Directory* size of /tmp can be grown up to available space on / filesystem. > > > > Any way to fix it? > > Haven't tested this, but are you sure it fills the filesystem up - > all a hard link is, is a file with the same inode as the > original file (correct me if I'm wrong) - therefore it > doesn't actually use any space other than that required > to store the file entry. You missed the dirty trick... :-) It's the size of +/tmp+ that fills /. The *directory* size. Because it has to *store* all these links... -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "What happened?" "It moved, sir!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message