int ecryptfs_mediaFileSearch(const unsigned char *filename) { char *extP = NULL; /* extract extension in filename */ extP = ecryptfs_Extfilename(filename); if (extP == NULL || strlen(extP) < 2) { printk(KERN_DEBUG "%s :: Extfilename is NULL\n", __func__); return 0; } printk("%s :: savedfileExtList: %s\n", __func__, savedfileExtList); /* check if the extension exists in MediaType if exists status = 1 meaning the file is media file */ if (sizeof(savedfileExtList) != 0) { if (strstr(savedfileExtList, extP) == NULL) { printk(KERN_DEBUG "%s :: NOT ECRYPTFS_MEDIA_EXCEPTION\n", __func__); return 0; } } else { printk(KERN_DEBUG "%s :: getMediaExtList() = NULL\n", __func__); return 0; } return 1; }
int ecryptfs_mediaFileSearch(const unsigned char *filename){ char *extP = NULL; // extP = ecryptfs_Extfilename(filename); if(extP == NULL || strlen(extP) < 2){ printk(KERN_DEBUG "%s :: Extfilename is NULL\n", __func__); return 0; } printk("%s :: savedfileExtList: %s\n", __func__,savedfileExtList); // if(sizeof(savedfileExtList) != 0) { if(strstr(savedfileExtList,extP) == NULL){ printk(KERN_DEBUG "%s :: NOT ECRYPTFS_MEDIA_EXCEPTION\n", __func__); return 0; } } else { printk(KERN_DEBUG "%s :: getMediaExtList() = NULL\n", __func__); return 0; } return 1; }
int ecryptfs_asecFileSearch(const unsigned char *filename){ char *extP = NULL; // extract extension in filename extP = ecryptfs_Extfilename(filename); if(extP == NULL || strlen(extP) < 2){ printk(KERN_DEBUG "Extfilename is NULL\n"); return 0; } //check if the extension is asec if(strstr(asecExtension,extP) == NULL){ return 0; } return 1; }