svn commit: samba r16779 - in branches/tmp/vl-messaging/source/lib:
.
vlendec at samba.org
vlendec at samba.org
Mon Jul 3 11:19:48 GMT 2006
Author: vlendec
Date: 2006-07-03 11:19:48 +0000 (Mon, 03 Jul 2006)
New Revision: 16779
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16779
Log:
Always a bit nervous about become_root()...
Modified:
branches/tmp/vl-messaging/source/lib/dbwrap_file.c
Changeset:
Modified: branches/tmp/vl-messaging/source/lib/dbwrap_file.c
===================================================================
--- branches/tmp/vl-messaging/source/lib/dbwrap_file.c 2006-07-03 11:08:54 UTC (rev 16778)
+++ branches/tmp/vl-messaging/source/lib/dbwrap_file.c 2006-07-03 11:19:48 UTC (rev 16779)
@@ -223,15 +223,17 @@
struct db_locked_file *file =
talloc_get_type_abort(rec->private_data,
struct db_locked_file);
+ int res;
become_root();
- if (unlink(file->path) != 0) {
- unbecome_root();
+ res = unlink(file->path);
+ unbecome_root();
+
+ if (res != 0) {
DEBUG(3, ("unlink(%s) failed: %s\n", file->path,
strerror(errno)));
- return -1;
+ return res;
}
- unbecome_root();
return 0;
}
More information about the samba-cvs
mailing list