~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to module-deprecated/apparmor_version.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *      Copyright (C) 2005 Novell/SUSE
3
 
 *
4
 
 *      This program is free software; you can redistribute it and/or
5
 
 *      modify it under the terms of the GNU General Public License as
6
 
 *      published by the Free Software Foundation, version 2 of the
7
 
 *      License.
8
 
 *
9
 
 *      AppArmor version definition
10
 
 */
11
 
 
12
 
#ifndef APPARMOR_VERSION
13
 
#error "-DAPPARMOR_VERSION must be specified when compiling this file"
14
 
#endif
15
 
 
16
 
#define APPARMOR_VERSION_STR_PFX "APPARMOR_VERSION="
17
 
 
18
 
#include <linux/module.h>
19
 
MODULE_VERSION(APPARMOR_VERSION);
20
 
 
21
 
/* apparmor_version_str exists to allow a strings on module to
22
 
 * see APPARMOR_VERSION= prefix
23
 
 */
24
 
static const char *apparmor_version_str =
25
 
                APPARMOR_VERSION_STR_PFX APPARMOR_VERSION;
26
 
 
27
 
/* apparmor_version_str_nl exists to allow an easy way to get a newline
28
 
 * terminated string without having to do dynamic memory allocation
29
 
 */
30
 
static const char *apparmor_version_str_nl = APPARMOR_VERSION "\n";
31
 
 
32
 
const char *apparmor_version(void)
33
 
{
34
 
        const int len = sizeof(APPARMOR_VERSION_STR_PFX) - 1;
35
 
 
36
 
        return apparmor_version_str + len;
37
 
}
38
 
 
39
 
const char *apparmor_version_nl(void)
40
 
{
41
 
        return apparmor_version_str_nl;
42
 
}