Hey Peter, The "Not Found" error is likely due to OBS being down earlier today. However, I agree Casey should submit to devel:base.
Ryan On Jan 24, 2011, at 7:02 PM, Zhu, Peter J wrote: > Please follow > http://wiki.meego.com/Release_Engineering/Submission_Checklist#Step_4:_Submit_from_correct_place_to_correct_place > and avoid common mistakes in > http://wiki.meego.com/Release_Engineering/Submission_Checklist#Common_Mistakes_and_FAQs > > using "osc branch" to do your work. > > Now this time it's even worse your package was not there > > Server returned an error: HTTP Error 404: Not Found > Diff not possible > Unknown package 'coreutils-smack-v2' in project 'home:caseys' > > Peter > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Casey Schaufler >> Sent: Tuesday, January 25, 2011 1:09 AM >> To: [email protected] >> Subject: [meego-commits] 12648: Changes to Trunk:Testing/coreutils >> >> Hi, >> I have made the following changes to coreutils in project Trunk:Testing. >> Please >> review and accept ASAP. >> >> Thank You, >> Casey Schaufler >> >> [This message was auto-generated] >> >> --- >> >> Request #12648: >> >> submit: home:caseys/coreutils-smack-v2(r5)(update) -> >> Trunk:Testing/coreutils >> >> >> Message: >> Add basic support for Smack labels. Carefully check Smack support in the >> kernel before attempting to preserve the "security context" and only do so on >> explicit request. >> >> State: new 2011-01-24T09:08:40 caseys >> Comment: None >> >> >> >> changes files: >> -------------- >> --- coreutils.changes >> +++ coreutils.changes >> @@ -0,0 +1,9 @@ >> +* Mon Jan 24 2011 Casey Schaufler <[email protected]> >> +- Include basic support for Smack labels. >> + Display with -Z in ls and id. >> + Maintain on explicit request in cp, mv, install >> + but only if the kernel is Smack emabled. >> + New patch: >> + coreutils-6.9-smack.patch >> + >> + >> >> new: >> ---- >> coreutils-6.9-smack.patch >> >> spec files: >> ----------- >> --- coreutils.spec >> +++ coreutils.spec >> @@ -45,6 +45,7 @@ >> Patch912: coreutils-overflow.patch >> Patch915: coreutils-split-pam.patch >> Patch916: coreutils-getfacl-exit-code.patch >> +Patch960: coreutils-6.9-smack.patch >> >> Patch1001: mktemp-1.5-build.patch >> >> @@ -113,6 +114,7 @@ >> %patch912 -p1 -b .overflow >> %patch915 -p1 -b .splitl >> %patch916 -p1 -b .getfacl-exit-code >> +%patch960 -p1 -b .smack >> >> #SELinux >> #%patch950 -p1 -b .selinux >> >> other changes: >> -------------- >> >> ++++++ coreutils-6.9-smack.patch (new) >> --- coreutils-6.9-smack.patch >> +++ coreutils-6.9-smack.patch >> +diff -uprN coreutils-6.9-patched/src/copy.c coreutils-6.9-smack/src/copy.c >> +--- coreutils-6.9-patched/src/copy.c 2011-01-18 16:09:35.326350631 >> -0800 >> ++++ coreutils-6.9-smack/src/copy.c 2011-01-18 17:10:55.686799495 -0800 >> +@@ -53,6 +53,7 @@ >> + #include "utimens.h" >> + #include "xreadlink.h" >> + #include "yesno.h" >> ++#include "smack.h" >> + >> + #ifndef HAVE_FCHOWN >> + # define HAVE_FCHOWN false >> +@@ -570,6 +571,28 @@ copy_reg (char const *src_name, char con >> + } >> + } >> + >> ++ if (x->preserve_context) >> ++ { >> ++ char src_context[SMACK_LABELLEN]; >> ++ char dst_context[SMACK_LABELLEN]; >> ++ >> ++ if (smack_of_fd (source_desc, src_context, SMACK_LABELLEN) < 0) >> ++ { >> ++ if (x->require_preserve) >> ++ return_val = false; >> ++ } >> ++ else if (smack_of_fd (dest_desc, dst_context, SMACK_LABELLEN) < 0) >> ++ { >> ++ if (x->require_preserve) >> ++ return_val = false; >> ++ } >> ++ else if (strcmp(src_context, dst_context)) >> ++ { >> ++ if (smack_to_fd(dest_desc, src_context) < 0 && >> x->require_preserve) >> ++ return_val = false; >> ++ } >> ++ } >> ++ >> + close_src_and_dst_desc: >> + if (close (dest_desc) < 0) >> + { >> +diff -uprN coreutils-6.9-patched/src/copy.h coreutils-6.9-smack/src/copy.h >> +--- coreutils-6.9-patched/src/copy.h 2011-01-18 16:00:55.976352118 >> -0800 >> ++++ coreutils-6.9-smack/src/copy.h 2011-01-18 17:10:55.686799495 -0800 >> +@@ -128,6 +128,10 @@ struct cp_options >> + bool preserve_mode; >> + bool preserve_timestamps; >> + >> ++ /* If true, attempt to give the copies the original files' >> ++ security context. */ >> ++ bool preserve_context; >> ++ >> + /* Enabled for mv, and for cp by the --preserve=links option. >> + If true, attempt to preserve in the destination files any >> + logical hard links between the source files. If used with cp's >> +diff -uprN coreutils-6.9-patched/src/cp.c coreutils-6.9-smack/src/cp.c >> +--- coreutils-6.9-patched/src/cp.c 2011-01-18 16:00:55.976352118 -0800 >> ++++ coreutils-6.9-smack/src/cp.c 2011-01-24 08:06:57.424498990 -0800 >> +@@ -35,6 +35,7 @@ >> + #include "stat-time.h" >> + #include "utimens.h" >> + #include "acl.h" >> ++#include "smack.h" >> + >> + #define ASSIGN_BASENAME_STRDUPA(Dest, File_name) \ >> + do \ >> +@@ -191,7 +192,7 @@ Mandatory arguments to long options are >> + -p same as >> --preserve=mode,ownership,timestamps\n\ >> + --preserve[=ATTR_LIST] preserve the specified attributes >> (default:\n\ >> + mode,ownership,timestamps), if >> possible\n\ >> +- additional attributes: links, all\n\ >> ++ additional attributes: links, context, >> all\n\ >> + "), stdout); >> + fputs (_("\ >> + --no-preserve=ATTR_LIST don't preserve the specified attributes\n\ >> +@@ -317,6 +318,27 @@ re_protect (char const *const_dst_name, >> + } >> + } >> + >> ++ if (x->preserve_context) >> ++ { >> ++ char src_context[SMACK_LABELLEN]; >> ++ char dst_context[SMACK_LABELLEN]; >> ++ >> ++ if (smack_of_file (src_name, src_context, SMACK_LABELLEN) < 0 >> || >> ++ smack_of_file (dst_name, dst_context, SMACK_LABELLEN) >> < 0) >> ++ { >> ++ error (0, errno, _("failed to preserve context for %s"), >> ++ quote (dst_name)); >> ++ return false; >> ++ } >> ++ if (strcmp (src_context, dst_context) && >> ++ smack_to_file (dst_name, src_context) < 0) >> ++ { >> ++ error (0, errno, _("failed to preserve context for %s"), >> ++ quote (dst_name)); >> ++ return false; >> ++ } >> ++ } >> ++ >> + if (x->preserve_ownership) >> + { >> + if (chown (dst_name, src_sb.st_uid, src_sb.st_gid) != 0 >> +@@ -749,6 +771,7 @@ cp_option_init (struct cp_options *x) >> + x->preserve_links = false; >> + x->preserve_mode = false; >> + x->preserve_timestamps = false; >> ++ x->preserve_context = false; >> + >> + x->require_preserve = false; >> + x->recursive = false; >> +@@ -777,18 +800,19 @@ decode_preserve_arg (char const *arg, st >> + PRESERVE_TIMESTAMPS, >> + PRESERVE_OWNERSHIP, >> + PRESERVE_LINK, >> ++ PRESERVE_CONTEXT, >> + PRESERVE_ALL >> + }; >> + static enum File_attribute const preserve_vals[] = >> + { >> + PRESERVE_MODE, PRESERVE_TIMESTAMPS, >> +- PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_ALL >> ++ PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, >> PRESERVE_ALL >> + }; >> + /* Valid arguments to the `--preserve' option. */ >> + static char const* const preserve_args[] = >> + { >> + "mode", "timestamps", >> +- "ownership", "links", "all", NULL >> ++ "ownership", "links", "context", "all", NULL >> + }; >> + ARGMATCH_VERIFY (preserve_args, preserve_vals); >> + >> +@@ -824,11 +848,17 @@ decode_preserve_arg (char const *arg, st >> + x->preserve_links = on_off; >> + break; >> + >> ++ case PRESERVE_CONTEXT: >> ++ if (smack_enabled()) >> ++ x->preserve_context = on_off; >> ++ break; >> ++ >> + case PRESERVE_ALL: >> + x->preserve_mode = on_off; >> + x->preserve_timestamps = on_off; >> + x->preserve_ownership = on_off; >> + x->preserve_links = on_off; >> ++ /* Do not include context. It is unexpected. */ >> + break; >> + >> + default: >> +@@ -887,6 +917,7 @@ main (int argc, char **argv) >> + x.preserve_timestamps = true; >> + x.require_preserve = true; >> + x.recursive = true; >> ++ /* Do not include context. It is unexpected. */ >> + break; >> + >> + case 'b': >> +diff -uprN coreutils-6.9-patched/src/id.c coreutils-6.9-smack/src/id.c >> +--- coreutils-6.9-patched/src/id.c 2011-01-18 16:47:35.547600371 -0800 >> ++++ coreutils-6.9-smack/src/id.c 2011-01-24 07:06:59.424125215 -0800 >> +@@ -29,6 +29,7 @@ >> + #include "system.h" >> + #include "error.h" >> + #include "quote.h" >> ++#include "smack.h" >> + >> + /* The official name of this program (e.g., no `g' prefix). */ >> + #define PROGRAM_NAME "id" >> +@@ -40,6 +41,7 @@ int getugroups (); >> + static void print_user (uid_t uid); >> + static void print_group (gid_t gid); >> + static void print_group_list (const char *username); >> ++static void print_context (void); >> + static void print_full_info (const char *username); >> + >> + /* The name this program was run with. */ >> +@@ -52,11 +54,15 @@ static bool use_name = false; >> + static uid_t ruid, euid; >> + static gid_t rgid, egid; >> + >> ++/* The security "context" to print. */ >> ++static char context[SMACK_LABELLEN]; >> ++ >> + /* True unless errors have been encountered. */ >> + static bool ok = true; >> + >> + static struct option const longopts[] = >> + { >> ++ {"context", no_argument, NULL, 'Z'}, >> + {"group", no_argument, NULL, 'g'}, >> + {"groups", no_argument, NULL, 'G'}, >> + {"name", no_argument, NULL, 'n'}, >> +@@ -80,6 +86,7 @@ usage (int status) >> + Print information for USERNAME, or the current user.\n\ >> + \n\ >> + -a ignore, for compatibility with other versions\n\ >> ++ -Z, --context print only the security context\n\ >> (732 more lines skipped) >> >> _______________________________________________ >> MeeGo-commits mailing list >> [email protected] >> http://lists.meego.com/listinfo/meego-commits > _______________________________________________ > MeeGo-packaging mailing list > [email protected] > http://lists.meego.com/listinfo/meego-packaging _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
