IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2009, 3:53:59 PM (17 years ago)
Author:
jhoblitt
Message:

restrict creation/modification/remove of xattrs to the user.* namespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r24276 r24291  
    740740    }
    741741
     742    # check to see if the user.mode xattr exists
     743
    742744    $log->debug("leaving");
    743745
     
    982984        {
    983985            type        => SCALAR,
     986            callbacks   => {
     987                'xattr is in user. namespace'
     988                    => sub { ($_[0]) =~ qr/^user\./ },
     989            },
    984990        },
    985991        {
     
    10651071        {
    10661072            type        => SCALAR,
     1073            callbacks   => {
     1074                'xattr is in user. namespace'
     1075                    => sub { ($_[0]) =~ qr/^user\./ },
     1076            },
    10671077        },
    10681078    );
     
    11611171        {
    11621172            type        => SCALAR,
     1173            callbacks   => {
     1174                'xattr is in user. namespace'
     1175                    => sub { ($_[0]) =~ qr/^user\./ },
     1176            },
    11631177        },
    11641178    );
     
    11801194            $query->finish;
    11811195
     1196            # no rows affected means the xattr did not exist
     1197            if ($rows == 0) {
     1198                $log->logdie( "xattr $key:$name does not exist" );
     1199            }
     1200
    11821201            # if we affected more then one row something very bad has happened.
    1183             unless ($rows == 1) {
     1202            if ($rows > 1) {
    11841203                $log->logdie( "affected row count is $rows instead of 1" );
    11851204            }
Note: See TracChangeset for help on using the changeset viewer.