"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "armour.c" between
cryptmount-5.3.tar.gz and cryptmount-5.3.1.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.c  (cryptmount-5.3):armour.c  (cryptmount-5.3.1)
/* /*
* Methods for encryption/security mechanisms for cryptmount * Methods for encryption/security mechanisms for cryptmount
* (C)Copyright 2005-2018, RW Penney * (C)Copyright 2005-2019, 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 664 skipping to change at line 664
sprintf(buff+2*i, "%02x", (unsigned)(key[i])); sprintf(buff+2*i, "%02x", (unsigned)(key[i]));
} }
return (2 * keylen); return (2 * keylen);
} }
int sycheck_directory(const char *dirname) int sycheck_directory(const char *dirname)
/** Check that permissions on directory are suitably restrictive */ /** Check that permissions on directory are suitably restrictive */
{ struct stat sdir; { struct stat sdir;
memset(&sdir, 0, sizeof(sdir));
/* Get information about directory (if present): */ /* Get information about directory (if present): */
errno = 0; errno = 0;
if (stat(dirname,&sdir) != 0) { if (stat(dirname, &sdir) != 0) {
if (errno == ENOENT) return ERR_NOERROR; if (errno == ENOENT) return ERR_NOERROR;
fprintf(stderr, "Cannot open \"%s\"\n", dirname); fprintf(stderr, "Cannot open \"%s\"\n", dirname);
return ERR_INSECURE; return ERR_INSECURE;
} }
/* Check file/directory ownerships: */ /* Check file/directory ownerships: */
if (sdir.st_uid != (uid_t)0) { if (sdir.st_uid != (uid_t)0) {
fprintf(stderr, "\"%s\" must be owned by root\n", dirname); fprintf(stderr, "\"%s\" must be owned by root\n", dirname);
return ERR_INSECURE; return ERR_INSECURE;
} }
skipping to change at line 831 skipping to change at line 833
} }
free((void*)fname); free((void*)fname);
return eflag; return eflag;
} }
/** @} */ /** @} */
/* /*
* (C)Copyright 2005-2018, RW Penney * (C)Copyright 2005-2019, RW Penney
*/ */
 End of changes. 4 change blocks. 
3 lines changed or deleted 5 lines changed or added

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