"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "armour-luks.c" between
cryptmount-5.3.1.tar.gz and cryptmount-5.3.2.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.

armour-luks.c  (cryptmount-5.3.1):armour-luks.c  (cryptmount-5.3.2)
skipping to change at line 207 skipping to change at line 207
* *
* @returns The previous value of UID. * @returns The previous value of UID.
*/ */
static uid_t luks_patch_uid(const bound_tgtdefn_t* boundtgt) static uid_t luks_patch_uid(const bound_tgtdefn_t* boundtgt)
{ const uid_t olduid = getuid(); { const uid_t olduid = getuid();
const char* filename = boundtgt->tgt->key.filename; const char* filename = boundtgt->tgt->key.filename;
struct stat sbuff; struct stat sbuff;
if (stat(filename, &sbuff) == 0 if (stat(filename, &sbuff) == 0
&& S_ISREG(sbuff.st_mode)) { && S_ISREG(sbuff.st_mode)) {
(void)setuid(geteuid()); if (setuid(geteuid()) != 0) {
fprintf(stderr, _("Failed to acquire privileges for LUKS container"));
}
} }
return olduid; return olduid;
} }
/*! @brief Change the password associated with a given LUKS key-slot. /*! @brief Change the password associated with a given LUKS key-slot.
* *
* This will either create an entirely new keyslot with the given password, * This will either create an entirely new keyslot with the given password,
* or attempt to change the password associated with a particular keyslot * or attempt to change the password associated with a particular keyslot
* while taking a temporary backup of the key in that slot. This requires * while taking a temporary backup of the key in that slot. This requires
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

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