The Samba-Bugzilla – Attachment 6523 Details for
Bug 8063
cannot upgrade from a11 to a14
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Second patch, accept more variety of SD
0002-s4-upgradeprovisision-fix-bug-8063-old-SD-can-miss-s.patch (text/plain), 3.63 KB, created by
Matthieu Patou
on 2011-06-05 14:33:57 UTC
(
hide
)
Description:
Second patch, accept more variety of SD
Filename:
MIME Type:
Creator:
Matthieu Patou
Created:
2011-06-05 14:33:57 UTC
Size:
3.63 KB
patch
obsolete
>From e58ed286a454b536fefcd2aff3f23c3ac1d20c34 Mon Sep 17 00:00:00 2001 >From: Matthieu Patou <mat@matws.net> >Date: Sun, 5 Jun 2011 17:39:32 +0400 >Subject: [PATCH 2/2] s4-upgradeprovisision: fix bug 8063, old SD can miss some componenent (group, owner, ...) > >Don't make the assumption that SD are correct, they can be wrong and >misformed. > >Fix this bug: https://bugzilla.samba.org/show_bug.cgi?id=8063 >--- > source4/scripting/python/samba/upgradehelpers.py | 36 ++++++++++++---------- > 1 files changed, 20 insertions(+), 16 deletions(-) > >diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py >index 16e4ea0..ad5de73 100755 >--- a/source4/scripting/python/samba/upgradehelpers.py >+++ b/source4/scripting/python/samba/upgradehelpers.py >@@ -372,42 +372,46 @@ def get_diff_sddls(refsddl, cursddl): > """ > > txt = "" >- hash_new = chunck_sddl(cursddl) >+ hash_cur = chunck_sddl(cursddl) > hash_ref = chunck_sddl(refsddl) > >- if hash_new["owner"] != hash_ref["owner"]: >+ if not hash_cur.has_key("owner"): >+ txt = "\tNo owner in current SD" >+ elif hash_cur["owner"] != hash_ref["owner"]: > txt = "\tOwner mismatch: %s (in ref) %s" \ >- "(in current)\n" % (hash_ref["owner"], hash_new["owner"]) >+ "(in current)\n" % (hash_ref["owner"], hash_cur["owner"]) > >- if hash_new["group"] != hash_ref["group"]: >+ if not hash_cur.has_key("group"): >+ txt = "%s\tNo group in current SD" % txt >+ elif hash_cur["group"] != hash_ref["group"]: > txt = "%s\tGroup mismatch: %s (in ref) %s" \ >- "(in current)\n" % (txt, hash_ref["group"], hash_new["group"]) >+ "(in current)\n" % (txt, hash_ref["group"], hash_cur["group"]) > > for part in ["dacl", "sacl"]: >- if hash_new.has_key(part) and hash_ref.has_key(part): >+ if hash_cur.has_key(part) and hash_ref.has_key(part): > > # both are present, check if they contain the same ACE >- h_new = set() >+ h_cur = set() > h_ref = set() >- c_new = chunck_acl(hash_new[part]) >+ c_cur = chunck_acl(hash_cur[part]) > c_ref = chunck_acl(hash_ref[part]) > >- for elem in c_new["aces"]: >- h_new.add(elem) >+ for elem in c_cur["aces"]: >+ h_cur.add(elem) > > for elem in c_ref["aces"]: > h_ref.add(elem) > > for k in set(h_ref): >- if k in h_new: >- h_new.remove(k) >+ if k in h_cur: >+ h_cur.remove(k) > h_ref.remove(k) > >- if len(h_new) + len(h_ref) > 0: >+ if len(h_cur) + len(h_ref) > 0: > txt = "%s\tPart %s is different between reference" \ > " and current here is the detail:\n" % (txt, part) > >- for item in h_new: >+ for item in h_cur: > txt = "%s\t\t%s ACE is not present in the" \ > " reference\n" % (txt, item) > >@@ -415,9 +419,9 @@ def get_diff_sddls(refsddl, cursddl): > txt = "%s\t\t%s ACE is not present in the" \ > " current\n" % (txt, item) > >- elif hash_new.has_key(part) and not hash_ref.has_key(part): >+ elif hash_cur.has_key(part) and not hash_ref.has_key(part): > txt = "%s\tReference ACL hasn't a %s part\n" % (txt, part) >- elif not hash_new.has_key(part) and hash_ref.has_key(part): >+ elif not hash_cur.has_key(part) and hash_ref.has_key(part): > txt = "%s\tCurrent ACL hasn't a %s part\n" % (txt, part) > > return txt >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8063
:
6436
|
6501
|
6514
|
6517
|
6518
|
6521
|
6522
| 6523 |
6564
|
6566