Change hammer_str_to_tid() and its callers to restrict the format of
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 15 Oct 2008 22:38:37 +0000 (22:38 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 15 Oct 2008 22:38:37 +0000 (22:38 +0000)
commitbc6c1f13bf702941e2a13e2bdce0548008682860
tree67655ebfdfe4a2051b21e8a0996a78be32fec887
parent433ec267d45899f58b1a0901b8032dc81e7f3ead
Change hammer_str_to_tid() and its callers to restrict the format of
strings after the '@@' portion of the filename.  Unknown formats are
simply passed through, so for example you can create a file called 'x@@b'
without it thinking it is 'x' with a @@b transaction id extension.

The formats allowed are:

    @@0x%016llx[:%05d]
    @@-1[:%05d]

Any other format is passed through and not treated specially.

Reported-by: "Steve O'Hara-Smith" <steve@sohara.org>
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_subs.c
sys/vfs/hammer/hammer_vnops.c