ALT Linux Bugzilla
– Attachment 1936 Details for
Bug 11648
не спрашивает PIN
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
kdebluetooth-1.0_beta2-alt-start-passkey-agent2.patch
kdebluetooth-1.0_beta2-alt-start-passkey-agent2.patch (text/plain), 1.64 KB, created by
Sergey V Turchin
on 2007-05-02 19:06:18 MSD
(
hide
)
Description:
kdebluetooth-1.0_beta2-alt-start-passkey-agent2.patch
Filename:
MIME Type:
Creator:
Sergey V Turchin
Created:
2007-05-02 19:06:18 MSD
Size:
1.64 KB
patch
obsolete
>--- kdebluetooth-1.0/kdebluetooth/kbluetoothd/kbluetoothd/application.cpp~ 2006-11-11 20:32:32 +0300 >+++ kdebluetooth-1.0/kdebluetooth/kbluetoothd/kbluetoothd/application.cpp 2007-05-02 18:58:43 +0400 >@@ -36,6 +36,54 @@ KBluetoothdApp::KBluetoothdApp() : > // Enable autostart > m_config->setGroup("General"); > m_config->writeEntry("AutoStart", true); >+ { >+ int pagent_pid = m_config->readNumEntry("PassKeyAgentPid", 0); >+ if( pagent_pid >= 0 ) >+ { >+ if( pagent_pid > 0 && ::kill(pagent_pid, 0) ) >+ { >+ QString proc = QString("/proc/%1/").arg(pagent_pid); >+ char buf[PATH_MAX]; >+ int num = ::readlink((proc+"exe").latin1(), buf, PATH_MAX); >+ if( num > 0 && qstrncmp(buf, "/usr/bin/passkey-agent", num) != 0 ) >+ pagent_pid = 0; >+ if( pagent_pid > 0 ) >+ { >+ QFile proc_status(proc+"status"); >+ if( proc_status.open(IO_ReadOnly) ) >+ { >+ QString qbuf; >+ int uid = ::getuid(); >+ while( proc_status.readLine(qbuf, 256) ) >+ { >+ if( qbuf.startsWith("Uid:") ) >+ { >+ if( uid != (QStringList::split("\t", qbuf, false)[1]).toInt() ) >+ pagent_pid = 0; >+ break; >+ } >+ qbuf = ""; >+ } >+ } >+ } >+ } >+ if( pagent_pid == 0 ) >+ { >+ pid_t new_pid = 0; >+ m_config->writeEntry("PassKeyAgentPid", new_pid); >+ if(::access("/usr/bin/passkey-agent", X_OK) == 0) >+ { >+ new_pid = fork(); >+ if( new_pid == 0 ) >+ { >+ ::execl("/usr/bin/passkey-agent", "/usr/bin/passkey-agent", "--default", "/usr/sbin/kbluepin", NULL); >+ } >+ } >+ if( new_pid > 0 ) >+ m_config->writeEntry("PassKeyAgentPid", new_pid); >+ } >+ } >+ } > m_config->sync(); > > metaServer = NULL;
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11648
:
1932
| 1936