summaryrefslogtreecommitdiffstats
path: root/perl-install/crypto.pm
Commit message (Expand)AuthorAgeFilesLines
* update land2tzs accordingly to new url2landGuillaume Cottenceau2002-01-291-0/+3
* Add url2land entries for nl, it, atGuillaume Cottenceau2002-01-291-0/+3
* Corrected various English typosPablo Saratxaga2002-01-281-2/+2
* add update medium for crypto for urpmi (flag update).Francois Pons2002-01-181-1/+3
* fixed typo.Francois Pons2002-01-181-1/+1
* allow selection/deselection of update medium (for cancel of installation).Francois Pons2002-01-181-0/+2
* fix incomplete prefix for update mirror when adding an entry for urpmi.Francois Pons2002-01-091-1/+1
* added bestMirror method to retrieve a good mirror (according to timezone) andFrancois Pons2002-01-071-5/+40
* removed test code.Francois Pons2002-01-041-12/+9
* allow to use same identifier for security medium (1u).Francois Pons2002-01-041-10/+12
* added update installation support to install (big modifs need testing).Francois Pons2002-01-041-21/+57
* move to MDK::Common, bool->to_boolPascal Rigaux2001-07-241-1/+1
* remove buggy prototypePascal Rigaux2001-07-021-1/+1
* no_commentPascal Rigaux2000-09-141-1/+1
* no_commentPascal Rigaux2000-08-221-5/+6
* no_commentPascal Rigaux2000-08-061-2/+1
* *** empty log message ***Francois Pons2000-06-191-1/+1
* *** empty log message ***Pascal Rigaux2000-06-051-1/+1
* *** empty log message ***Pascal Rigaux2000-06-051-3/+4
* *** empty log message ***Francois Pons2000-04-191-1/+1
* no_commentPascal Rigaux2000-04-171-2/+2
* no_commentPascal Rigaux2000-04-171-1/+1
* *** empty log message ***Francois Pons2000-04-141-1/+1
* *** empty log message ***Francois Pons2000-04-051-1/+28
* no_commentPascal Rigaux2000-01-101-0/+2
* no_commentPascal Rigaux2000-01-011-1/+1
* no_commentPascal Rigaux1999-11-281-0/+41
n 1; if ((fd = open (device, mode)) < 0) { close(ffd); return 1; } memset(&loopinfo, 0, sizeof (loopinfo)); strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); loopinfo.lo_name[LO_NAME_SIZE - 1] = 0; loopinfo.lo_offset = 0; #ifdef MCL_FUTURE /* * Oh-oh, sensitive data coming up. Better lock into memory to prevent * passwd etc being swapped out and left somewhere on disk. */ if(mlockall(MCL_CURRENT|MCL_FUTURE)) { log_message("CRITICAL Couldn't lock into memory! %s (memlock)", strerror(errno)); return 1; } #endif if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { close(fd); close(ffd); return 1; } if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { (void) ioctl (fd, LOOP_CLR_FD, 0); close(fd); close(ffd); return 1; } close(fd); close(ffd); return 0; } char * loopdev = "/dev/loop3"; /* Ugly. But do I care? */ void del_loop(void) { int fd; if ((fd = open (loopdev, O_RDONLY)) < 0) return; if (ioctl (fd, LOOP_CLR_FD, 0) < 0) return; close (fd); } static char * where_mounted = NULL; int lomount(char *loopfile, char *where) { long int flag; flag = MS_MGC_VAL; flag |= MS_RDONLY; my_insmod("loop", ANY_DRIVER_TYPE, NULL); if (set_loop(loopdev, loopfile)) { log_message("set_loop failed on %s (%s)", loopdev, strerror(errno)); return 1; } if (my_mount(loopdev, where, "iso9660", 0)) { del_loop(); return 1; } where_mounted = strdup(where); log_message("lomount succeeded for %s on %s", loopfile, where); return 0; } int loumount() { if (where_mounted) { umount(where_mounted); where_mounted = NULL; } del_loop(); return 0; }