From a944c4437304341a5ec6ad07a694311a462f241d Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Tue, 10 Oct 2023 12:36:27 +0200 Subject: [PATCH] Highlighting + property based search slide --- Doc/DbDevel/dbDevel.xml | 65 +++++++++++++++++++++++++++++++++++++-- Doc/Sdi/Apache/apache.xml | 2 +- Doc/Sdi/Ldap/ldap.xml | 29 ++++++++--------- 3 files changed, 78 insertions(+), 18 deletions(-) diff --git a/Doc/DbDevel/dbDevel.xml b/Doc/DbDevel/dbDevel.xml index c18854e2e..2be5f5eb1 100644 --- a/Doc/DbDevel/dbDevel.xml +++ b/Doc/DbDevel/dbDevel.xml @@ -8501,7 +8501,7 @@ package de.hdm_stuttgart.mi.sd1.<emphasis role="red">fraction</emphasis>; <tr> <td valign="top"><screen>dbgrep --profile <emphasis role="red">postgresTest</emphasis> ...</screen></td> - <td valign="top"><programlisting>host=myserver.companynet.com + <td valign="top"><programlisting language="properties">host=myserver.companynet.com port=5432 database=main_test_data user=testuser @@ -8514,7 +8514,8 @@ driver=Driver/postgresql-42.6.0.jar</programlisting></td> <figure xml:id="dbDevelDbGrepSpecLevel"> <title>Search level specification</title> - <screen>dbgrep ... <co linkends="dbDevelDbGrepSpecLevel-1" + <programlisting language="bash">dbgrep ... <co + linkends="dbDevelDbGrepSpecLevel-1" xml:id="dbDevelDbGrepSpecLevel-1-co"/> dbgrep ... --table User --table Stocks <co linkends="dbDevelDbGrepSpecLevel-2" xml:id="dbDevelDbGrepSpecLevel-2-co"/>... @@ -8522,7 +8523,7 @@ dbgrep ... --column User.userId <co linkends="dbDevelDbGrepSpecLevel-3" xml:id="dbDevelDbGrepSpecLevel-3-co"/> ... dbgrep ... --table Stocks --column User.userId ... <co linkends="dbDevelDbGrepSpecLevel-4" - xml:id="dbDevelDbGrepSpecLevel-4-co"/></screen> + xml:id="dbDevelDbGrepSpecLevel-4-co"/></programlisting> <calloutlist role="slideExclude"> <callout arearefs="dbDevelDbGrepSpecLevel-1-co" @@ -8553,6 +8554,64 @@ dbgrep ... --table Stocks --column User.userId ... <co </calloutlist> </figure> + <figure xml:id="dbDevelDbGrepSpecProperties"> + <title>Property based searches</title> + + <programlisting language="bash">dbgrep ... --equal 237 <co + linkends="dbDevelDbGrepSpecProperties-1" + xml:id="dbDevelDbGrepSpecProperties-1-co"/> +dbgrep ... --greater 4.43 <co linkends="dbDevelDbGrepSpecProperties-2" + xml:id="dbDevelDbGrepSpecProperties-2-co"/> +dbgrep ... --like 'Smit%' <co linkends="dbDevelDbGrepSpecProperties-3" + xml:id="dbDevelDbGrepSpecProperties-3-co"/> +dbgrep ... --like 'Smit%' --and --greater 4 <co + linkends="dbDevelDbGrepSpecProperties-4" + xml:id="dbDevelDbGrepSpecProperties-4-co"/> +dbgrep ... --range [-3:17] <co linkends="dbDevelDbGrepSpecProperties-5" + xml:id="dbDevelDbGrepSpecProperties-5-co"/></programlisting> + + <calloutlist> + <callout arearefs="dbDevelDbGrepSpecProperties-1-co" + xml:id="dbDevelDbGrepSpecProperties-1"> + <para>Search for integer values equal to 237. Depending on the + corresponding search level we distinguish:</para> + + <glosslist> + <glossentry> + <glossterm>Database</glossterm> + + <glossdef> + <para>Search all tables for compatible integer columns. + Return either a list of all tables containing at least one + occurrence of 237 or the data records themselves depending + on an output formatting rule,</para> + </glossdef> + </glossentry> + </glosslist> + </callout> + + <callout arearefs="dbDevelDbGrepSpecProperties-2-co" + xml:id="dbDevelDbGrepSpecProperties-2"> + <para/> + </callout> + + <callout arearefs="dbDevelDbGrepSpecProperties-3-co" + xml:id="dbDevelDbGrepSpecProperties-3"> + <para/> + </callout> + + <callout arearefs="dbDevelDbGrepSpecProperties-4-co" + xml:id="dbDevelDbGrepSpecProperties-4"> + <para/> + </callout> + + <callout arearefs="dbDevelDbGrepSpecProperties-5-co" + xml:id="dbDevelDbGrepSpecProperties-5"> + <para/> + </callout> + </calloutlist> + </figure> + <para>A tool might be implemented either as a single command or as a terminal based application keeping state information.</para> </section> diff --git a/Doc/Sdi/Apache/apache.xml b/Doc/Sdi/Apache/apache.xml index 2fbec9d03..fabfe6bc2 100644 --- a/Doc/Sdi/Apache/apache.xml +++ b/Doc/Sdi/Apache/apache.xml @@ -207,7 +207,7 @@ <abbrev>e.g.</abbrev> <xref linkend="glo_LDAP"/> administration frontend:</para> - <screen>aptitude install apache2</screen> + <screen language="bash">aptitude install apache2</screen> <section xml:id="sdiApacheFirstSteps"> <title>First Steps</title> diff --git a/Doc/Sdi/Ldap/ldap.xml b/Doc/Sdi/Ldap/ldap.xml index 6f2a9895b..c8d5916c1 100644 --- a/Doc/Sdi/Ldap/ldap.xml +++ b/Doc/Sdi/Ldap/ldap.xml @@ -92,7 +92,7 @@ </tr> <tr> - <td valign="top"><screen><command + <td valign="top"><screen language="bash"><command xlink:href="https://linux.die.net/man/1/ldapsearch">ldapsearch</command> \ -h localhost <co linkends="sdi_ldap_bind-1.2" xml:id="sdi_ldap_bind-1.2-co"/> \ -D "cn=admin,dc=betrayer,dc=com" <co linkends="sdi_ldap_bind-2.2" @@ -104,7 +104,7 @@ -s sub <co linkends="sdi_ldap_bind-5.2" xml:id="sdi_ldap_bind-5.2-co"/> \ -LLL <co linkends="sdi_ldap_bind-6.2" xml:id="sdi_ldap_bind-6.2-co"/></screen></td> - <td valign="top"><screen>dn: dc=betrayer,dc=com <co + <td valign="top"><screen language="ldif">dn: dc=betrayer,dc=com <co linkends="sdi_ldap_bind-7" xml:id="sdi_ldap_bind-7-co"/> objectClass: top objectClass: dcObject @@ -504,7 +504,7 @@ password: <emphasis role="red">123456789</emphasis></programlisting> <figure xml:id="sdi_ldap_ldifSample"> <title>LDIF sample</title> - <programlisting language="none">dn: uid=clark,ou=finance,dc=betrayer,dc=de + <programlisting language="ldif">dn: uid=clark,ou=finance,dc=betrayer,dc=de objectClass: posixAccount objectClass: inetOrgPerson cn: Sandy Clark @@ -692,12 +692,12 @@ userPassword: {SSHA}noneOfYourBusiness</programlisting> <itemizedlist> <listitem> <para>Then browse your own entry again. Can you spot any - difference? </para> + difference?</para> </listitem> <listitem> <para>Then browse your colleague's entry. Can you spot any - difference? </para> + difference?</para> </listitem> </itemizedlist> </listitem> @@ -767,7 +767,7 @@ userPassword: {SSHA}noneOfYourBusiness</programlisting> <para>You may have to install the dialog package as a prerequisite to the <productname>openldap</productname> server package:</para> - <screen>aptitude install dialog + <screen language="bash">aptitude install dialog aptitude install slapd</screen> <para>based on the <xref linkend="glo_DNS"/> domain @@ -1101,7 +1101,7 @@ dn: uid=smith,ou=financial,ou=software,ou=departments,dc=betrayer,dc=com <command>ldapsearch</command> command is part of the <package>openldap-utils</package> package:</para> - <screen>ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config + <programlisting language="bash">ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config # {0}config, config dn: olcDatabase={0}config,cn=config @@ -1116,7 +1116,7 @@ dn: olcDatabase={1}mdb,cn=config ... <emphasis role="bold">olcRootDN: cn=admin,dc=hdm-stuttgart,dc=de olcRootPW: {SSHA}7M0gUyHOH7cfK1z9amqgK0uQcn84AuYw</emphasis> -...</screen> +...</programlisting> <para>The above lines appear near in the tail section. We see two databases <code>{0}</code> and <code>{1}</code> representing two @@ -1136,7 +1136,7 @@ olcRootPW: {SSHA}7M0gUyHOH7cfK1z9amqgK0uQcn84AuYw</emphasis> of an <xref linkend="glo_LDIF"/> file adding a (possibly different) hashed password:</para> - <screen>root@sdi8a:~# cat ~/add_olcRootPW.ldif + <screen language="ldif">root@sdi8a:~# cat ~/add_olcRootPW.ldif dn: olcDatabase={0}config,cn=config add: olcRootPW olcRootPW: {ssha}pHE+EPOG2gyRyOgjvFqsWOb5zGsGl9CD</screen> @@ -1144,7 +1144,7 @@ olcRootPW: {ssha}pHE+EPOG2gyRyOgjvFqsWOb5zGsGl9CD</screen> <para>Activating this configuration my be effected by using <command xlink:href="http://www.openldap.org/software/man.cgi?query=ldapmodify&apropos=0&sektion=0&manpath=OpenLDAP+2.4-Release&format=html">ldapmodify</command>:</para> - <screen>root@sdi8a:~# ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f ~/add_olcRootPW.ldif + <screen language="bash">root@sdi8a:~# ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f ~/add_olcRootPW.ldif modifying entry "olcDatabase={0}config,cn=config"</screen> <para>This activation in turn enables a new account:</para> @@ -1234,7 +1234,7 @@ modifying entry "olcDatabase={0}config,cn=config"</screen> <filename>/etc/pam.conf</filename> and files below <filename>/etc/pam.d</filename> beforehand:</para> - <screen>cd /etc + <screen language="bash">cd /etc tar zcf /root/pam.tgz pam.conf pam.d</screen> <para>Check the resulting archive to contain something @@ -1291,7 +1291,7 @@ tar zxf /root/pam.tgz # Restore your working PAM configuration</screen> by uid e.g. <code>uid=ldaptest,ou=people,...</code> . On successful configuration you should see:</para> - <screen>$ id ldaptest + <screen language="bash">$ id ldaptest uid=1001(ldaptest) gid=1001(ldaptest) groups=1001(ldaptest)</screen> <para>A <quote>id: ‘<code>ldaptest</code>’: no such user</quote> @@ -1320,7 +1320,7 @@ shadow: files ldap</programlisting> <listitem> <para>Your Secure Shell Daemon configuration /etc/ssh/sshd_config should contain:<programlisting - language="bourne">PasswordAuthentication yes</programlisting></para> + language="none">PasswordAuthentication yes</programlisting></para> </listitem> <listitem> @@ -1497,7 +1497,8 @@ shadow: files ldap</programlisting> <itemizedlist> <listitem> - <para>Descend a given arbitrary LDAP tree recursively.</para> + <para>Descend a given arbitrary <xref linkend="glo_LD"/> tree + recursively.</para> </listitem> <listitem> -- GitLab