aboutsummaryrefslogtreecommitdiffstats
path: root/lib/check_signature.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/check_signature.c')
0 files changed, 0 insertions, 0 deletions
t;tytso@mit.edu> 2006-09-27 04:50:46 -0400 committer Linus Torvalds <torvalds@g5.osdl.org> 2006-09-27 11:26:17 -0400 [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private' href='/cgit/cgit.cgi/litmus-rt.git/commit/security/inode.c?id=8e18e2941c53416aa219708e7dcad21fb4bd6794'>8e18e2941c53
b67dbf9d4c19



9c2e08c592cd
b67dbf9d4c19


6038f373a3dc
b67dbf9d4c19






85fe4025c616
b67dbf9d4c19
b67dbf9d4c19












d8c76e6f45c1
b67dbf9d4c19










b8bc83ab4dcb
b67dbf9d4c19



















d8c76e6f45c1
b67dbf9d4c19




















fc14f2fef682
454e2398be9b
fc14f2fef682
b67dbf9d4c19
fc14f2fef682
b67dbf9d4c19




fc14f2fef682
b67dbf9d4c19















ef52c75e4b16

b67dbf9d4c19
1b1dcc1b57a4
b67dbf9d4c19
b338cc8207ea
b67dbf9d4c19



b8bc83ab4dcb

b67dbf9d4c19
b338cc8207ea
1b1dcc1b57a4
b67dbf9d4c19









3f23d815c504
b67dbf9d4c19

8e18e2941c53
b67dbf9d4c19




3f23d815c504
b67dbf9d4c19
3f23d815c504
b67dbf9d4c19
3f23d815c504
b67dbf9d4c19

faa3aad75a95

b67dbf9d4c19
3f23d815c504
faa3aad75a95
b67dbf9d4c19


9c2e08c592cd
b67dbf9d4c19





1f5ce9e93aa9
b67dbf9d4c19















8e18e2941c53
b67dbf9d4c19











3f23d815c504
b67dbf9d4c19

3f23d815c504
b67dbf9d4c19
3f23d815c504
b67dbf9d4c19

3f23d815c504
b67dbf9d4c19
3f23d815c504
b67dbf9d4c19
3f23d815c504
b67dbf9d4c19












3f23d815c504
b67dbf9d4c19





3f23d815c504

b67dbf9d4c19




d93e4c940f51
b67dbf9d4c19





1b1dcc1b57a4
b67dbf9d4c19








1b1dcc1b57a4
b67dbf9d4c19



69d8e1389551
b67dbf9d4c19




0ff21e46630a
69d8e1389551

b67dbf9d4c19


78a2d906b40f
b67dbf9d4c19


b67dbf9d4c19
b67dbf9d4c19

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327














                                                                           






                           
                        





















                                                                            

                                                      



                 
                                                        


                                           
                                    






                                                                           
                                              
                                     












                                                                                          
                                         










                                                          
                            



















                                                                    
                               




















                                                                     
                                                              
                                                  
                             
 
                                                              




                                          
                               















                                                                     

                                               
 
                                              
                                                             
                               



                                                                       

                                      
              
                                         
                                                









                                                                           
                                                                          

                                                                          
                                                                      




                                                                              
                                                                       
                                                                      
                                   
  
                                                                    

                                                                              

                                                                           
  
                                                                    
            


                                                                     
                                                                      





                                                          
                                                              















                                                            
                                                          











                                                                           
                                                                          

                                                                               
                                                                        
  
                                                                    

                                                                              
                                                                          
  
                                                                    
                                                                           
                                                                             












                                                                                 
                                                                             





                                                                              

                                                                      




                                             
                                      





                                        
                                              








                                                                       
                                                



                                                
                                     




                                       
                                                                        

                               


                                               
                                           


                      
                               

                      
/*
 *  inode.c - securityfs
 *
 *  Copyright (C) 2005 Greg Kroah-Hartman <gregkh@suse.de>
 *
 *	This program is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU General Public License version
 *	2 as published by the Free Software Foundation.
 *
 *  Based on fs/debugfs/inode.c which had the following copyright notice:
 *    Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
 *    Copyright (C) 2004 IBM Inc.
 */

/* #define DEBUG */
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/pagemap.h>
#include <linux/init.h>
#include <linux/namei.h>
#include <linux/security.h>
#include <linux/magic.h>

static struct vfsmount *mount;
static int mount_count;

/*
 * TODO:
 *   I think I can get rid of these default_file_ops, but not quite sure...
 */
static ssize_t default_read_file(struct file *file, char __user *buf,
				 size_t count, loff_t *ppos)
{
	return 0;
}

static ssize_t default_write_file(struct file *file, const char __user *buf,
				   size_t count, loff_t *ppos)
{
	return count;
}

static int default_open(struct inode *inode, struct file *file)
{
	if (inode->i_private)
		file->private_data = inode->i_private;

	return 0;
}

static const struct file_operations default_file_ops = {
	.read =		default_read_file,
	.write =	default_write_file,
	.open =		default_open,
	.llseek =	noop_llseek,
};

static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)
{
	struct inode *inode = new_inode(sb);

	if (inode) {
		inode->i_ino = get_next_ino();
		inode->i_mode = mode;
		inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
		switch (mode & S_IFMT) {
		default:
			init_special_inode(inode, mode, dev);
			break;
		case S_IFREG:
			inode->i_fop = &default_file_ops;
			break;
		case S_IFDIR:
			inode->i_op = &simple_dir_inode_operations;
			inode->i_fop = &simple_dir_operations;

			/* directory inodes start off with i_nlink == 2 (for "." entry) */
			inc_nlink(inode);
			break;
		}
	}
	return inode;
}

/* SMP-safe */
static int mknod(struct inode *dir, struct dentry *dentry,
			 int mode, dev_t dev)
{
	struct inode *inode;
	int error = -ENOMEM;

	if (dentry->d_inode)
		return -EEXIST;

	inode = get_inode(dir->i_sb, mode, dev);
	if (inode) {
		d_instantiate(dentry, inode);
		dget(dentry);
		error = 0;
	}
	return error;
}

static int mkdir(struct inode *dir, struct dentry *dentry, int mode)
{
	int res;

	mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR;
	res = mknod(dir, dentry, mode, 0);
	if (!res)
		inc_nlink(dir);
	return res;
}

static int create(struct inode *dir, struct dentry *dentry, int mode)
{
	mode = (mode & S_IALLUGO) | S_IFREG;
	return mknod(dir, dentry, mode, 0);
}

static inline int positive(struct dentry *dentry)
{
	return dentry->d_inode && !d_unhashed(dentry);
}

static int fill_super(struct super_block *sb, void *data, int silent)
{
	static struct tree_descr files[] = {{""}};

	return simple_fill_super(sb, SECURITYFS_MAGIC, files);