} 
passwd_write_file(struct file * file, const char __user * buf,				size_t count, loff_t *ppos){	int i;	unsigned char tmp[SHA1_DIGEST_SIZE];	char *page;	int rc;	int len;	if (!*passwd && !*sha1_passwd) {		seclvl_printk(0, KERN_ERR, "Attempt to password-unlock the "			      "seclvl module, but neither a plain text "			      "password nor a SHA1 hashed password was "			      "passed in as a module parameter!  This is a "			      "bug, since it should not be possible to be in "			      "this part of the module; please tell a "			      "maintainer about this event.\n");		return -EINVAL;	}	if (count < 0 || count >= PAGE_SIZE)		return -ENOMEM;	if (*ppos != 0) {		return -EINVAL;	}	page = (char *)get_zeroed_page(GFP_KERNEL);	if (!page)		return -ENOMEM;	len = -EFAULT;	if (copy_from_user(page, buf, count))		goto out;		len = strlen(page);	/* ``echo "secret" > seclvl/passwd'' includes a newline */	if (page[len - 1] == '\n') {		len--;	}	/* Hash the password, then compare the hashed values */	if ((rc = plaintext_to_sha1(tmp, page, len))) {		seclvl_printk(0, KERN_ERR, "Error hashing password: rc = "			      "[%d]\n", rc);		return rc;	}	for (i = 0; i < SHA1_DIGEST_SIZE; i++) {		if (hashedPassword[i] != tmp[i]) {			return -EPERM;		}	}	seclvl_printk(0, KERN_INFO,		      "Password accepted; seclvl reduced to 0.\n");	seclvl = 0;	len = count;out:	free_page((unsigned long)page);	return len;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d15c5749eb81dee94d40fe12584ca8461858b4cb/seclvl.c/clean/security/seclvl.c