policycoreutils: sandbox: introduce package name and language stuff

Add support for translations to the sandbox utility.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Eric Paris 2011-08-15 20:10:14 -04:00
parent 4a145b76d0
commit e134013ab7

View File

@ -1,3 +1,8 @@
/*
* Authors: Dan Walsh <dwalsh@redhat.com>
* Authors: Thomas Liu <tliu@fedoraproject.org>
*/
#define _GNU_SOURCE
#include <signal.h>
#include <sys/fsuid.h>
@ -42,6 +47,10 @@
#define MS_PRIVATE 1<<18
#endif
#ifndef PACKAGE
#define PACKAGE "policycoreutils" /* the name of this package lang translation */
#endif
#define BUF_SIZE 1024
#define DEFAULT_PATH "/usr/bin:/bin"
#define USAGE_STRING _("USAGE: seunshare [ -v ] [ -C ] [ -c ] [ -k ] [ -t tmpdir ] [ -h homedir ] [ -Z CONTEXT ] -- executable [args] ")
@ -848,6 +857,12 @@ int main(int argc, char **argv) {
}
*/
#ifdef USE_NLS
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
#endif
struct passwd *pwd=getpwuid(uid);
if (!pwd) {
perror(_("getpwduid failed"));