"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dmutils.c" between
cryptmount-5.3.2.tar.gz and cryptmount-5.3.3.tar.gz

About: cryptmount allows any user to access encrypted filing systems on demand under GNU/Linux systems. It also assists the system administrator in creating and managing encrypted filesystems based on the kernels dm-crypt device-mapper target.

dmutils.c  (cryptmount-5.3.2):dmutils.c  (cryptmount-5.3.3)
/* /*
* Device-mapper utilities for cryptmount * Device-mapper utilities for cryptmount
* (C)Copyright 2005-2019, RW Penney * (C)Copyright 2005-2021, RW Penney
*/ */
/* /*
This file is part of cryptmount This file is part of cryptmount
cryptmount is free software; you can redistribute it and/or modify cryptmount is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
skipping to change at line 270 skipping to change at line 270
* other processes to fail if they try to destroy * other processes to fail if they try to destroy
* or reconfigure those devices at the same time. * or reconfigure those devices at the same time.
* Whether this is the responsibilty of kernel-level functions * Whether this is the responsibilty of kernel-level functions
* to resolve, or for user applications to mitigate, * to resolve, or for user applications to mitigate,
* is open to debate. */ * is open to debate. */
time(&starttime); time(&starttime);
#if HAVE_LIBUDEV #if HAVE_LIBUDEV
udev_ctx = udev_new(); udev_ctx = udev_new();
udev_selinux_init(udev_ctx); //udev_selinux_init(udev_ctx);
udev_qu = udev_queue_new(udev_ctx); udev_qu = udev_queue_new(udev_ctx);
#endif #endif
/* Try to find location and type of udev event queue: */ /* Try to find location and type of udev event queue: */
udev_mode = udev_queue_locations; udev_mode = udev_queue_locations;
while (udev_mode->is_file) { while (udev_mode->is_file) {
if (stat(udev_mode->path, &sbuff) == 0) break; if (stat(udev_mode->path, &sbuff) == 0) break;
++udev_mode; ++udev_mode;
} }
skipping to change at line 314 skipping to change at line 314
settling |= (udev_queue_size(udev_mode->path) > 0); settling |= (udev_queue_size(udev_mode->path) > 0);
} else { } else {
/* Older versions of udev use a directory of event files: */ /* Older versions of udev use a directory of event files: */
settling |= udev_active_dir(udev_mode->path, starttime, timeout); settling |= udev_active_dir(udev_mode->path, starttime, timeout);
} }
#endif /* HAVE_LIBUDEV */ #endif /* HAVE_LIBUDEV */
} while (settling && totdelay < timeout); } while (settling && totdelay < timeout);
#if HAVE_LIBUDEV #if HAVE_LIBUDEV
udev_queue_unref(udev_qu); udev_queue_unref(udev_qu);
udev_selinux_exit(udev_ctx); //udev_selinux_exit(udev_ctx);
udev_unref(udev_ctx); udev_unref(udev_ctx);
#endif #endif
return settling; return settling;
} }
int udev_queue_size(const char *path) int udev_queue_size(const char *path)
/*! Count number of unprocessed udev events in queue.bin file */ /*! Count number of unprocessed udev events in queue.bin file */
{ FILE *fp; { FILE *fp;
unsigned long long seqnum; unsigned long long seqnum;
skipping to change at line 370 skipping to change at line 370
events, or possibly it is a remnant from an old udev process. */ events, or possibly it is a remnant from an old udev process. */
if (stat(path, &sbuff) == 0) { if (stat(path, &sbuff) == 0) {
settling |= ((starttime - sbuff.st_mtime) < 100 * timeout); settling |= ((starttime - sbuff.st_mtime) < 100 * timeout);
} }
return settling; return settling;
} }
/* /*
* (C)Copyright 2005-2019, RW Penney * (C)Copyright 2005-2021, RW Penney
*/ */
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)