<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>51675</bug_id>
          
          <creation_ts>2024-10-09 14:33:28 +0300</creation_ts>
          <short_desc>system-auth - На пробелах в OU падает, версию показать не может</short_desc>
          <delta_ts>2024-10-14 12:17:00 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>alterator-auth</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anton Shevtsov">shevtsov.anton</reporter>
          <assigned_to name="Evgeny Sinelnikov">sin</assigned_to>
          <cc>boyarsh</cc>
    
    <cc>cas</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>252766</commentid>
    <comment_count>0</comment_count>
    <who name="Anton Shevtsov">shevtsov.anton</who>
    <bug_when>2024-10-09 14:33:28 +0300</bug_when>
    <thetext>1. не понимает вложенных ou с пробелами в опции createcomputer

 /usr/sbin/system-auth  write ad DOMAIN.RU $(hostname -s) GIS Administrator Qwerty1 --createcomputer=&quot;sub1/sub2/sub3/Last level&quot;

на пробеле развалится, и ни кавычки, ни экранирование не поможет

2. не может показать свою версию (--version)

system-auth --version
getopt: нераспознанный параметр «--version»



исправления этих багов ниже

--- system-auth.sisyphus        2024-10-09 15:52:50.979390095 +0500
+++ system-auth 2024-10-09 16:11:39.317110806 +0500
@@ -15,7 +15,7 @@
 while [[ $# -gt 0 ]]; do
   case &quot;$1&quot; in
     &apos;-d&apos;) set -x; shift;;
-    &apos;--createcomputer&apos;) shift; OU=&quot;createcomputer=$1&quot;; shift;;
+    &apos;--createcomputer&apos;) shift; OU=&quot;$1&quot;; shift;;
     &apos;--windows2003&apos;)  win2003=&quot;true&quot;; shift;;
     &apos;--winbind&apos;)  use_winbind=&quot;true&quot;; shift;;
     &apos;--gpo&apos;)  use_gpo=&quot;true&quot;; shift;;
@@ -774,7 +774,7 @@
        fi
 
        # Join to domain
-       $net_cmd ads join --use-kerberos=required --no-dns-updates --use-krb5-ccache=&quot;$krb_ccache_name&quot; $OU osName=&quot;$OS_NAME&quot; osVer=&quot;$OS_VER&quot;
+       $net_cmd ads join --use-kerberos=required --no-dns-updates --use-krb5-ccache=&quot;$krb_ccache_name&quot; createcomputer=&quot;${OU}&quot; osName=&quot;$OS_NAME&quot; osVer=&quot;$OS_VER&quot;
 
        [ &quot;$?&quot; -ne 0 ] &amp;&amp; return 1
 
@@ -829,7 +829,7 @@
 status     show current authentication information
 list       list available authentication schemes
 write      set authentication parameters
---version  show current program version
+version  show current program version
 
 Examples:
 Show current authentication information
@@ -983,7 +983,7 @@
         ;;
       esac
     ;;
-    --version)
+    version)
         rpm -q alterator-auth --qf &apos;%{version}\n&apos;
        ;;
     *)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>252961</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-10-14 12:17:00 +0300</bug_when>
    <thetext>alterator-auth-0.44.11-alt1 -&gt; sisyphus:

 Mon Oct 14 2024 Andrey Cherepanov &lt;cas@altlinux&gt; 0.44.11-alt1
 - system-auth: added support spaces in OU for registered computers (ALT #51675).
 - system-auth: fixed show version.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>