diff options
| author | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:39:43 +0000 | 
|---|---|---|
| committer | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:39:43 +0000 | 
| commit | 2e9f1bbdab7ee4cbf9fba8b5c99cb3e970f35f4b (patch) | |
| tree | 192e2e752d21f4b27a0b0f702a7e295311ff8a4b | |
| parent | 2db38a1c391dbad2ea503d4894a837ba669968f7 (diff) | |
Correctly implement the documented intention that setting an attribute
to the empty string clears the attribute values.
| -rw-r--r-- | NEWS | 3 | ||||
| -rw-r--r-- | perl/Wallet/Server.pm | 3 | 
2 files changed, 6 insertions, 0 deletions
| @@ -7,6 +7,9 @@ wallet 0.5 (unreleased)      Load the Perl modules for ACL verifiers and object types dynamically      now that we're reading the class from the database. +    Correctly implement the documented intention that setting an attribute +    to the empty string clears the attribute values. +      Fix the keytab principal validation regex to allow instances      containing periods.  Otherwise, it's hard to manage host keytabs.  Add      a missing test suite for that method. diff --git a/perl/Wallet/Server.pm b/perl/Wallet/Server.pm index 5a7efb9..f04c139 100644 --- a/perl/Wallet/Server.pm +++ b/perl/Wallet/Server.pm @@ -373,6 +373,9 @@ sub attr {      my $host = $self->{host};      if (@values) {          return unless $self->acl_check ($object, 'setattr'); +        if (@values == 1 and $values[0] eq '') { +            @values = (); +        }          my $result = $object->attr ($attr, [ @values ], $user, $host);          $self->error ($object->error) unless $result;          return $result; | 
