Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158634 Details for
Bug 247215
Reimplement ds_remove (cgi) and ds_removal (command line wrapper) without setuputil code
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
cvs diff ldapserver/ldap/admin/src/scripts/Util.pm.in
Util.pm.in.diffs (text/plain), 5.10 KB, created by
Noriko Hosoi
on 2007-07-06 01:14:49 UTC
(
hide
)
Description:
cvs diff ldapserver/ldap/admin/src/scripts/Util.pm.in
Filename:
MIME Type:
Creator:
Noriko Hosoi
Created:
2007-07-06 01:14:49 UTC
Size:
5.10 KB
patch
obsolete
>Index: Util.pm.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Util.pm.in,v >retrieving revision 1.5 >diff -t -w -U4 -r1.5 Util.pm.in >--- Util.pm.in 4 Jul 2007 01:28:17 -0000 1.5 >+++ Util.pm.in 6 Jul 2007 01:01:28 -0000 >@@ -232,23 +232,21 @@ > " error " . $conn->getErrorString() . "\n"); > } > do > { >- my $needtoadd; > my @addtypes; # list of attr types for mod add > my @reptypes; # list of attr types for mod replace > my @deltypes; # list of attr types for mod delete >- my $MOD_NONE = 0; >- my $MOD_ADD = 1; >- my $MOD_REPLACE = 2; >- my $MOD_SPECIAL = 3; >- # $needtomod stores either of the above $MOD_ values >- # note: delete is not supported >- my $needtomod; >+ my $OP_NONE = 0; >+ my $OP_ADD = 1; >+ my $OP_MOD = 2; >+ my $OP_MOD_SPECIAL = 3; >+ my $OP_DEL = 4; >+ # $op stores either of the above $OP_ values >+ my $op = $OP_NONE; > if ( 0 > $#ctypes ) # aentry: complete entry > { >- $needtoadd = 1; >- $needtomod = 0; #$MOD_NONE >+ $op = $OP_ADD; > > my $rc = -1; > if ( $sentry && !$fresh ) > { >@@ -257,15 +255,14 @@ > if ( 0 == $rc && !$fresh ) > { > # the identical entry exists on the configuration DS. > # no need to add the entry. >- $needtoadd = 0; >+ $op = $OP_NONE; > goto out; > } > elsif ( (1 == $rc) && !$fresh ) > { >- $needtoadd = 0; >- $needtomod = $MOD_ADD; >+ $op = $OP_MOD; > @addtypes = keys %{$aentry}; # add all attrs > } > elsif ( $sentry && $sentry->{dn} ) > { >@@ -283,23 +280,29 @@ > } > } > else # aentry: modify format > { >- $needtoadd = 0; > if ( $sentry ) > { >+ if ( "delete" eq $ctypes[0] ) >+ { >+ $op = $OP_DEL; >+ } >+ else >+ { > @addtypes = $aentry->getValues("add"); > @reptypes = $aentry->getValues("replace"); > @deltypes = $aentry->getValues("delete"); >- $needtomod = $MOD_REPLACE; >+ $op = $OP_MOD; >+ } > } > else > { >- $needtomod = $MOD_NONE; >+ $op = $OP_NONE; > } > } > >- if ( 1 == $needtoadd ) >+ if ( $OP_ADD == $op ) > { > $conn->add($aentry); > my $rc = $conn->getErrorCode(); > if ( $rc != 0 ) >@@ -312,12 +315,23 @@ > return 0; > } > debug(1, "Entry $aentry->{dn} is added\n"); > } >- elsif ( 0 < $needtomod ) # $sentry exists >+ elsif ( $OP_DEL == $op ) >+ { >+ my $rc = delete_all($conn, $sentry); >+ if ( 0 != $rc ) >+ { >+ push @{$errs}, 'error_deleteall_entries', $sentry->{dn}, $conn->getErrorString(); >+ debug(1, "Error deleting $sentry->{dn}\n"); >+ return 0; >+ } >+ debug(1, "Entry $aentry->{dn} is deleted\n"); >+ } >+ elsif ( 0 < $op ) # $sentry exists > { > my $attr; >- if ( $needtomod == $MOD_SPECIAL ) >+ if ( $OP_MOD_SPECIAL == $op ) > { > debug(3, "Doing MOD_SPECIAL for entry $aentry->{dn}\n"); > foreach $attr ( keys %speciallist ) > { >@@ -669,29 +683,39 @@ > } > else > { > # get the value from one of the Inf passed in >+ # they $value could be pure Key or Key:"default_value" >+ my ($key_value, $default_value) = split(/:/, $value, 2); > my $infsection; > foreach my $thisinf (@infdata) > { > foreach my $section0 (keys %{$thisinf}) > { > $infsection = $thisinf->{$section0}; > next if (!ref($infsection)); >- if (defined($infsection->{$value})) >+ if (defined($infsection->{$key_value})) > { >- $mapper->{$key} = $infsection->{$value}; >+ $mapper->{$key} = $infsection->{$key_value}; > next KEY; > } > } > } > if (!defined($infsection->{$value})) > { >+ if ($default_value ne "") >+ { >+ $default_value =~ tr/\"//d; # default_value is a regular double quoted string - remove quotes >+ $mapper->{$key} = $default_value; >+ } >+ else >+ { > push @{$errs}, 'no_mapvalue_for_key', $value, $key; > return {}; > } > } > } >+ } > return $mapper; > } > > sub getHashedPassword {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247215
: 158634 |
158635
|
158676
|
158876
|
158879
|
158913
|
158917
|
158918
|
158919
|
159392
|
159393
|
159487
|
160087