[Freeipa-devel] [PATCH] Notify user when deleting nonexistent user or group

Jakub Hrozek jhrozek at redhat.com
Fri Jul 31 10:02:01 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/30/2009 08:45 PM, Stephen Gallagher wrote:
> I'm going to nack the user notification patch. I think we need to think
> some more about this. The sysdb has an interface in place for returning
> ENOENT when trying to delete, we're just setting it
> state->ignore_not_found = true; in sysdb_delete_entry_send().
> 
> I think the correct thing to do would be to modify that function so that
> it accepted a boolean value for whether or not to ignore it if it's not
> found.
> 
> This way, we aren't doing an extra search.

I agree, I didn't realize there was this option. Thanks for the review.

Attached are three patches:
* [PATCH 1/3] Add ignore_not_found parameter to sysdb delete functions
changes the sysdb API, its invocations in the code and adds a test for
the change
* [PATCH 2/3] Use correct return codes
The already-acked patch, included for clarity
* [PATCH 3/3] Notify user when deleting nonexistent user or group
Changes tools code to react with appropriate error message to ENOENT

	Jakub
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkpywRkACgkQHsardTLnvCXZxACgpoTd+OQHRec9YpzR+JQH+8SN
FlgAoNVZM838bstekX49AdxE/X2iCOUH
=tMJo
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-ignore_not_found-parameter-to-sysdb-delete-funct.patch
Type: text/x-patch
Size: 16069 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090731/fc294152/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-correct-return-codes.patch
Type: text/x-patch
Size: 2671 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090731/fc294152/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Notify-user-when-deleting-nonexistent-user-or-group.patch
Type: text/x-patch
Size: 2771 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090731/fc294152/attachment-0002.bin>


More information about the Freeipa-devel mailing list